Hi,
First a quote from the EJB 2.0 PFD 3 specification:
"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 ..."
Does this mean that if I call Session Bean A, it then calls class B (which is not an EJB) and class B kicks off a thread, then I have violated the EJB specification? I assume the answer is "yes" but I would like a second (or third or fourth ...) opinion.
Cheers,
Darren.
-
Using threads within Session beans (2 messages)
- Posted by: Darren Abbruzzese
- Posted on: March 08 2002 12:30 EST
Threaded Messages (2)
- Using threads within Session beans by Gal Binyamini on March 08 2002 22:03 EST
- Using threads within Session beans by Stephen Johnson on March 09 2002 15:34 EST
-
Using threads within Session beans[ Go to top ]
- Posted by: Gal Binyamini
- Posted on: March 08 2002 22:03 EST
- in response to Darren Abbruzzese
The answer is yes, assuming that class B is not a part of a seperate J2EE component. If it is a seperate J2EE component, whether or not it can manipulate threads depends on it's own component type. For instance, if you talk to a Connector object, the Connector may manipulate threads to some extent: because the J2EE connector architecture allows it.
Gal -
Using threads within Session beans[ Go to top ]
- Posted by: Stephen Johnson
- Posted on: March 09 2002 15:34 EST
- in response to Darren Abbruzzese
Short answer is yes. Unfortunately, all user managed threads must be kicked off before you hit the EJB layer.
Fuji