*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 15952
    
  19

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: 15952
    
  19

" 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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Can We Apply User Defined Threads in EJB?
 
Similar Threads
EJB Interview Questions
deamon
servlet calling EJB
regarding daemon thread in java
Can we use user defined threads in EJB. If not then why?