Rickard �berg wrote:
>
> Hey
>
> Nitin Sood wrote:
> > Can one use threads in a business method of an EJB. For example, can I
> > have the following peice of code inside a business method.
> >
> >         Thread thread1 = new Thread(instance1);
> >         Thread thread2 = new Thread(instance2);
> >
> >         thread1.start();
> >         thread2.start();
>
> Nope, not allowed. Correctly implemented servers wont let you.

That is incorrect. "Portable" bean code may not use threads. This is the
Bean Provider's responsibility. The Container is not required to prevent you
from creating threads. As a Bean Provider you may not assume that such code
will be portable, but it may work and be very useful in some EJB containers.

> Do it outside of the bean.
>
> /Rickard
>
> ===========================================================================
> 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".

--
________________________________________________________________________________

Evan Ireland              Sybase EA Server Engineering       [EMAIL PROTECTED]
                            Wellington - New Zealand              +64 4 934-5856

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

Reply via email to