I think that a minimal solution could be to put the mbean that start the thread just 
after 
the Autodeployer Mbean so, you insure that the ejbs are deployed before you start your 
thread

david arnone

-----Original Message-----
From: David Jencks [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 5:30 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Background process


Use an mbean extending ServiceMBeanSupport, and start the thread in
startService. If the requirement on code location is really a _requirement_
use jboss 3 and put the mbean code + config in a .sar in your .ear. You may
need to have the mbean "depends" on the ejbs it uses so it waits to start
until they are started.

david jencks

On 2002.03.06 10:12:41 -0500 Loïc Lefèvre wrote:
> Hi,
> Could someone tell me the best way to implement a background
> process (a thread) that has access to some EJBs (server side).
> The code of this process must be in the ear archive.
> 
> Currently, I have only two ideas:
> - Run my thread in the init method of a servlet.
> - Run my thread in a static block of an EJB (I know it's very bad).
> 
> Regards,
> Loïc Lefèvre
> 
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to