tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Weber <erikwe...@mindspring.com>
Subject JMX Timer
Date Wed, 18 Aug 2004 09:32:37 GMT
Hello. I searched the archives at 
http://mikal.org/interests/java/tomcat/archive/search?search=JMX+Timer 
but found no results.

I am porting a small Servlet application from WebLogic 8.x to Tomcat 
5.x. The application has a Servlet context listener that instantiates 
and starts a JMX Timer instance during initialization. This Timer runs 
for the lifetime of the app, occasionally causing an object to invoke a 
web service and updatw a database with data collected from the web 
service response.

I don't have much experience with Tomcat running stand alone, and could 
use some help with the JMX aspect.

In WebLogic, you instantiate a weblogic.management.timer.Timer directly. 
This class is very similar to javax.management.timer.Timer (I think it's 
an extension). Then you add a NotificationListener and a Notification to 
the Timer, and then you start it. That's all there is to it.

So to deploy this application in Tomcat, I assume I will somehow 
instantiate a javax.management.timer.Timer in place of the 
WebLogic-specific Timer, or else I will find an instance  using some 
factory or lookup service. How is this done? Do I instantiate one 
directly, just like the WebLogic class, or do I have to obtain the 
instance from some factory or some other service? Do I have to configure 
the Tomcat server in any particular ways to use the Timer?

I would appreciate your advice on this. I can paste some pseudocode of 
the unported app if I need to.

Thanks,
Erik

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message