aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Precision concerning Stateful and Singleton beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Precision concerning Stateful and Singleton beans" Watch "Precision concerning Stateful and Singleton beans" New topic
Author

Precision concerning Stateful and Singleton beans

Mehdi Singer
Greenhorn

Joined: May 10, 2011
Posts: 4
Hi!

I'm quite new to EJB's and I'd like to have a precision regarding stateful and singleton beans. Consider following code:


Can I consider that my list beans will ALWAYS contain different instances of BeanB? Or is my singleton BeanA considered as a single client and then will fill my array with 5 identical instances of BeanA? I've tested and it seems to me that the instances are different but I'd like to make sure that it will always be the case...

Thanks for your help !
Andrew Moko
Ranch Hand

Joined: Dec 16, 2011
Posts: 55
Remember when doing a jndi lookup, the client doesnt access/ call the remote object directly. The client creates a stub which communicates with the server skeleton (with a reference to the remote object). My best guess is with each lookup comes a seperate/ new stub??

I'd be interested in what other ranches have to say about this..
 
 
subject: Precision concerning Stateful and Singleton beans