Your EJB, executing within a transaction, starts a new thread. First, this compromises security. A lot of started threads may hang the container. Second, without letting the container know about the threads, these won't execute within a transaction. Third, when would the transaction be committed? Fourth, when would the method return?
Allowing for EJBs to start threads would complicate both App Server creation and usabililty of the whole technology. You can start threads from other locations, for instance, within a JSP page/Servlet. My 2c, Juan Pablo Lorandi Chief Software Architect Code Foundry Ltd. [EMAIL PROTECTED] Barberstown, Straffan, Co. Kildare, Ireland. Tel: +353-1-6012050 Fax: +353-1-6012051 Mobile: +353-86-2157900 www.codefoundry.com > -----Original Message----- > From: A mailing list for Enterprise JavaBeans development > [mailto:[EMAIL PROTECTED] On Behalf Of Kalra, Ashwani > Sent: Thursday, August 28, 2003 12:46 PM > To: [EMAIL PROTECTED] > Subject: Re: Threads in EJB?? > > > hi, > This is what I read from specs > > "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. > > Reason :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. > > " > > May be it will interfere impact its thread management capability. > > /Ashwani kalra > > > > > > > > -----Original Message----- > From: CharanKumar [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 28, 2003 1:44 PM > To: [EMAIL PROTECTED] > Subject: Re: Threads in EJB?? > > > Container handles the Threading, u need not worry abt it... > > -Charan > ----- Original Message ----- > From: "Alok_Band" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, August 28, 2003 12:53 PM > Subject: Threads in EJB?? > > > > Hi, > > > > Why EJB spec refrains developers from using Threads in Enterprise > > Beans? > Can > > anyone please explain how it creates problem of transaction > > management? > > > > Regards, > > Alok > > > ********************************************************************** > > **** > > This email (including any attachments) is intended for the > sole use of the > > intended recipient/s and may contain material that is > CONFIDENTIAL AND > > PRIVATE COMPANY INFORMATION. Any review or reliance by > others or copying > or > > distribution or forwarding of any or all of the contents in this > > message > is > > STRICTLY PROHIBITED. If you are not the intended recipient, please > > contact the sender by email and delete all copies; your > cooperation in > > this regard is appreciated. > > > ********************************************************************** > > **** > > > > > ============================================================== > ============= > > To unsubscribe, send email to [EMAIL PROTECTED] and > include in the > body > > of the message "signoff EJB-INTEREST". For general help, > send email > > to [EMAIL PROTECTED] and include in the body of the message > > "help". > > ============================================================== > ============= > To unsubscribe, send email to [EMAIL PROTECTED] and > include in the body of the message "signoff EJB-INTEREST". > For general help, send email to [EMAIL PROTECTED] and > include in the body of the message "help". > > ____________________________________________________ > This message contains information that may be privileged or > confidential and is the property of the Cap Gemini Ernst & > Young Group. It is intended only for the person to whom it is > addressed. If you are not the intended recipient, you are not > authorised to read, print, retain, copy, disseminate, > distribute, or use this message or any part thereof. If you > receive this message in error, please notify the sender > immediately and delete all copies of this message. > > ============================================================== > ============= > To unsubscribe, send email to [EMAIL PROTECTED] and > include in the body of the message "signoff EJB-INTEREST". > For general help, send email to [EMAIL PROTECTED] and > include in the body of the message "help". > =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".