dcsimg
Please kindly list out all bean-independent resources which can be instance variable of stateless session bean
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   fox_fox
Posted On:   Wednesday, July 24, 2002 01:34 AM

Hi all ejb guru


Can someone do me a favour to sum up all bean-independent resources such as home handle, datasource, jndi context,etc which can be the instance variables of stateless session bean ? Please also kindly list out all bean-specific resources which should not be stored as instance variable at stateless session instance ?



thanks & regards


ah so

Re: Please kindly list out all bean-independent resources which can be instance variable of stateless session bean

Posted By:   N_Levi  
Posted On:   Wednesday, August 14, 2002 05:36 PM

Stateless means the bean cannot have state. In fact, instance variables should be avoided all together. Since Stateless session beans are pooled, saving state would corrupt your application.

If you saved state while using one instance, then got another instance to perform another method (because their transaction only exist for the life of the method) then the new instance is likely to have different values than the first.

Hope that helps.
About | Sitemap | Contact