On Thu, May 13, 2004 at 11:23:17AM -0400, Shapira, Yoav wrote:
: I, on the other hand, would be interested to see what you come up with,
: so don't stop your train of thought on my account.

If you're looking for a full restart, there are several ways (in varying
levels of hackishness).

Once you've figured out the trigger (described below), it's a matter of
having that call:
        {tomcat script} stop ; {tomcat script} start


Triggers:

1 changes in a file: under Linux, you could use FAM to monitor a file
  (say, server.xml).  Under OSs that don't support FAM you'd have to do
  a periodic poll(), which may cause problems if there are many other
  processes poll()ing for files.

2 Tomcat request: under Linux/Unix, a servlet/JSP could fire a
  System.exec() that calls an "at" job.  That would put the call
  to the script outside of the current process.
  (Not sure how calls to System.exec() are prohibited by the default
  security manager.)

3 Without the "at" job, the container could create/update a specified
  file watched by the FAM/poll() app...

etc, etc.

If anyone's interested in #1, I'd be happy to drive it.  I've been
experimenting with FAM lately, and could probably whip up something that
supports non-FAM OSs, too...  If you wanted to stick with Java (make it
cross-platform) that should be fairly straightforward, as well.

If you're looking to reload the *app* on file change, that's probably a
matter of having the trigger kick a JMX action.  -but I've reached total
stream-of-consciousness here so I'll stop rambling... ;)

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to