Alex,

It is not permissible.  It is not in the j2ee spec; it is in the ejb spec.

ejb-2_0-fr2-spec.pdf: 24.1.2 Programming restrictions, page 495:

"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."

Someone else who knows more than me can answer your last question, but I'll
guess you're right - the tx (and probably security) information is probably
related at the thread level.  A possible implementation is the
java.lang.ThreadLocal class.

David


Mensaje citado por Alex Sumner <[EMAIL PROTECTED]>:

> Hi,
> 
> Briefly: is it permissible to start a new thread from a thread running
> in a session bean? 
> 
> I've heard that it isn't allowed, but can't see this explicitly
> prohibited in the J2EE specs. More importantly, what will the
> consequences be in JBoss? If the session bean thread is in a TX, would I
> be correct in assuming the new thread will not be associated with that
> TX?
> 
> Thanks,
> 
> Alex
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by:
> The Definitive IT and Networking Event. Be There!
> NetWorld+Interop Las Vegas 2003 -- Register today!
> http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 


---------------------
David Ward
[EMAIL PROTECTED]
http://www.dotech.com


-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to