This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

are Home object and EJB object multi-thread?

 
Win Yu
Ranch Hand
Posts: 224
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are Home object and EJB object multi-thread?
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Win Yu
Ranch Hand
Posts: 224
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, but ejb bean instance is always single-thread. am I correct?
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
Posts: 224
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic