Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can i have threads created in EJB Session Bean

 
Sharat Tallam
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to do some asyncronoss job from EJB, Can i call multiple threads from EJB Session Bean..

I see there are some restrictions in EJB specs mentioned at http://java.sun.com/blueprints/qanda/ejb_tier/restrictions.html

Please let me know you thoughts. If anyone already worked out on this.. Any valuable advice, either to do in web tier or in ejb tier, if i have no choice doing this multple thread job in web tier can i do in ejb tier.

Thanks
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Taken straight from the spec :
21.1.2 Programming Restrictions
The enterprise bean must not attempt to manage threads. The enterprise bean must not attempt to start, stop, suspend, or resume a thread, or to change a thread’s priority or name. The enterprise bean must not attempt to manage thread groups.
These functions are reserved for the EJB container. Allowing the enterprise bean to manage threads would decrease the container’s ability to properly manage the runtime environment.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic