Amazon

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

TOGAF 9.2 - STUDY [ The Open Group Architecture Framework ] - Chap 01 - Introduction

100 Feet View of TOGAF  What is Enterprise? Collection of Organization that has common set of Goals. Enterprise has People - organized by co...