File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 16061
    
  21

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: 16061
    
  21

" 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.
 
 
subject: Can We Apply User Defined Threads in EJB?