my dog learned polymorphism*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes are Home object and EJB object multi-thread? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "are Home object and EJB object multi-thread?" Watch "are Home object and EJB object multi-thread?" New topic
Author

are Home object and EJB object multi-thread?

Win Yu
Ranch Hand

Joined: Oct 17, 2001
Posts: 224
are Home object and EJB object multi-thread?


Win
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

are Home object and EJB object multi-thread?

Well that depends. It really is up to the Application Server. You don't need to synchronize anything, because the App server ahndles it for you here. And the EJB Object depeneds on Pooling. Either the App Server has a pool of EJB Objects, or a single instance, it is still thread-safe, because the App Server handles that.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Win Yu
Ranch Hand

Joined: Oct 17, 2001
Posts: 224
thanks, but ejb bean instance is always single-thread. am I correct?
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

"but ejb bean instance is always single-thread"
Are you talking about Entity Beans? I think one bean is shared for each "Record" in the persistence layer.
Mark
Win Yu
Ranch Hand

Joined: Oct 17, 2001
Posts: 224
Originally posted by Mark Spritzler:
"but ejb bean instance is always single-thread"
Are you talking about Entity Beans? I think one bean is shared for each "Record" in the persistence layer.
Mark

Yes, they maybe shared. But all bean instances are single-threaded as page 115 of Master EJB.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: are Home object and EJB object multi-thread?
 
Similar Threads
Is there a pattern to simulate multi-thread in EJB?
'single-threaded'ness of ejbs
Question about SCBCD Study Guide by Mikalai Zaikin
A Very good Resource
Weblogic 8.1 : JSP-SessionBean-EntityBean