Saturday, May 29, 2010

Transient - Can they be used for optimizaton?

Control serialization in remote EJBs

When you decide to write your code for distributed /remote object you need to carefully choose what method parameters you want to send over the network,for example when you pass an object like this :

remoteObject.setPersonInfo(person); // call remote object by passing object

here, not only the PersonInfo object will be serialized and sent over network but all the total PersonInfo object graph (variables and it's super class variables except transient variables) will also be sent through network because of default behavior. You might want to send only PersonInfo object only but not total object graph.

To avoid this problem, use 'transient' key word for the attributes that need not be sent over the network.

No comments:

Post a Comment

Amazon Best Sellors

Weblogic - Server Creation - Issues

Datasource creation using python script.  Python Script was failing after creating Datasource. From UI Admin Console, if I try to activat...