dcsimg
Binding Object with JNDI
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ramkumar_Sundaram
Posted On:   Friday, May 11, 2001 03:10 PM

Hi I have a class. I created an instance of the class and bound that instance under a JNDI name thru a class called "Binder". After the execution of "Binder" I wrote a client program to lookup the object and retrieve values from the object. But none of the member variables of the object had the values with which they were bound. Instead they had initialization values. Is this because of the following reason : Once the object is bound and when the scope of the object ends then its garbage collected and what I lookup is a fresh instance. If so, is there any other way to solve this problem. What I ultimately require is this : I want to bind an object. Several clients will    More>>

Hi

I have a class. I created an instance of the class and bound that instance under a JNDI name thru a class called "Binder". After the execution of "Binder" I wrote a client program to lookup the object and retrieve values from the object. But none of the member variables of the object had the values with which they were bound. Instead they had initialization values.

Is this because of the following reason :

Once the object is bound and when the scope of the object ends then its garbage collected and what I lookup is a fresh instance.

If so, is there any other way to solve this problem. What I ultimately require is this :

I want to bind an object.
Several clients will access this same object (thru Servlets / thru JSPs) and manipulate it (Note : All clients should access the same copy).

Thank U

   <<Less
About | Sitemap | Contact