This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Can We Apply User Defined Threads in EJB? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Can We Apply User Defined Threads in EJB?" Watch "Can We Apply User Defined Threads in EJB?" New topic
Author

Can We Apply User Defined Threads in EJB?

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
Can user defined threads be applied in EJB?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16470
    
  23

No, EJB's are not allowed to create threads, according to the Sun EJB specification.


Customer surveys are for companies who didn't pay proper attention to begin with.
JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
Why user defined threads are not allowed in EJB?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16470
    
  23

" 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.
-----
From the Sun EJB 2.0 spec. Sorry about the delay.
JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
I appreciate the answer. Thank you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can We Apply User Defined Threads in EJB?