-
1. Re: Running seperate thread in JBOSS
jonlee Nov 11, 2003 6:42 PM (in response to gopalsaha)You might consider using the scheduler in JBoss to initiate the task - it avoids having to create a special thread encapsulation. Otherwise you would have to think about building an MBean to run your thread. The other possibility is to use Quartz which is along the same lines as the JBoss scheduler. YMMV.
-
2. Re: Running seperate thread in JBOSS
gopalsaha Nov 12, 2003 7:18 AM (in response to gopalsaha)Thank you so much Jon a bit more explanation with an example if you have would be highly beneficial for me please.
Thanks again
gopal -
3. Re: Running seperate thread in JBOSS
jonlee Nov 12, 2003 8:36 AM (in response to gopalsaha)The old timer/scheduler tutorial is here - http://jboss.sourceforge.net/doc-24/ch11s58.html.
The starting point for MBeans is the Sun docs at http://docs.sun.com/db/doc/806-6633?q=mbeans
However, the JBoss source is littered with concrete MBean examples. You might consider looking at the pool branch of the source or even the timer/scheduler source as nicely separable and isolated examples.
The Quartz project is located here - http://www.quartzscheduler.org/index.jsp.
Hope that gets you a start. -
4. Re: Running seperate thread in JBOSS
gopalsaha Nov 12, 2003 9:12 AM (in response to gopalsaha)Many Thanks Jon that does definitely help me to start with.
-
5. Re: Running seperate thread in JBOSS
cvandyck Dec 19, 2003 4:09 PM (in response to gopalsaha)We are running JBoss 3.2.1, and we use the JMX Timer functionality to create our scheduled services.
We create an MBean that implements:
javax.management.NotificationListener
and extends
org.jboss.system.ServiceMBeanSupport
.
Then, in the jboss-service.xml file, we declare that MBean that is dependent on another MBean of type javax.management.timer.Timer. This Timer bean fires off notification that the first bean knows how to respond to.
Hop that helps