tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Your advise with Background Thread Creation / Management ?
Date Wed, 01 Jun 2005 11:23:13 GMT
I would like to include code within the WAR that instates itself after the Web Context has
been sucessfully initialised, this context will create one (or more) background threads. 
This should instate itself at context initialisation through deployment (independantly of
any website activity).

I would then like to get access to one or more exposed API classes from my web application.
 This will be a simple start/stop/status.   I believe the JNDI to be limited within tomcat,
would I have to implement my own lookup mechanism to find or could I dynamically register
control classes in JNDI for my WebApp to lookup and access ?

The code is fairly specific to the WAR as-in I would like to distribute it within the WAR
and have it register for init and cleanup call to startup/shutdown threads based on deployment
status changes.  So when I upgrade my WAR it will also upgrade this thread manager an worker
task classes.

I have looked at JMX/MBean and this looks like it may fit, given my spec could anyone advise
?   Would I be correct in saying I can create an mbean-descriptor.xml file within my WAR in
the same package as my management class, that it does not have to be installed in JAR files
installed into $CATALINA_HOME/server/lib, I'm trying to simplify deployment issues ?

Am I free to create threads within my management class within tomcats JVM ?

Darryl L. Miles

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message