> Like tomcat,when I put a war into the webapps directory,it starts to
> unzip it.
> How did it do that??
I'm not aware of any way to 'hook' into the filesystem, by Tomcat does it by
having a background thread check the webapps directory every few seconds.
Cheers,
Bo
lightning - 23 May 2007 10:56 GMT
> > Like tomcat,when I put a war into the webapps directory,it starts to
> > unzip it.
[quoted text clipped - 5 lines]
> Cheers,
> Bo
Wow,thx for your knowledge!So the tomcat is!
Just a timertask....I thought it may cost too much,but it is a simple
nice solution.
Like many other situations which need "interruption mechanism" but do
not have it,en,just build a new thread to handle these...
What else needs paying attention to if I do this?
lightning - 23 May 2007 10:56 GMT
> > Like tomcat,when I put a war into the webapps directory,it starts to
> > unzip it.
[quoted text clipped - 5 lines]
> Cheers,
> Bo
Wow,thx for your knowledge!So the tomcat is!
Just a timertask....I thought it may cost too much,but it is a simple
nice solution.
Like many other situations which need "interruption mechanism" but do
not have it,en,just build a new thread to handle these...
What else needs paying attention to if I do this?
lightning - 23 May 2007 10:56 GMT
> > Like tomcat,when I put a war into the webapps directory,it starts to
> > unzip it.
[quoted text clipped - 5 lines]
> Cheers,
> Bo
Wow,thx for your knowledge!So the tomcat is!
Just a timertask....I thought it may cost too much,but it is a simple
nice solution.
Like many other situations which need "interruption mechanism" but do
not have it,en,just build a new thread to handle these...
What else needs paying attention to if I do this?
lightning - 23 May 2007 10:56 GMT
> > Like tomcat,when I put a war into the webapps directory,it starts to
> > unzip it.
[quoted text clipped - 5 lines]
> Cheers,
> Bo
Wow,thx for your knowledge!So the tomcat is!
Just a timertask....I thought it may cost too much,but it is a simple
nice solution.
Like many other situations which need "interruption mechanism" but do
not have it,en,just build a new thread to handle these...
What else needs paying attention to if I do this?
lightning - 23 May 2007 10:57 GMT
> > Like tomcat,when I put a war into the webapps directory,it starts to
> > unzip it.
[quoted text clipped - 5 lines]
> Cheers,
> Bo
Wow,thx for your knowledge!So the tomcat is!
Just a timertask....I thought it may cost too much,but it is a simple
nice solution.
Like many other situations which need "interruption mechanism" but do
not have it,en,just build a new thread to handle these...
What else needs paying attention to if I do this?
lightning - 23 May 2007 10:57 GMT
Wow,thx for your knowledge!So the tomcat is!
Just a timertask....I thought it may cost too much,but it is a simple
nice solution.
Like many other situations which need "interruption mechanism" but do
not have it,en,just build a new thread to handle these...
What else needs paying attention to if I do this?
lightning - 23 May 2007 10:57 GMT
Wow,thx for your knowledge!So the tomcat is!
Just a timertask....I thought it may cost too much,but it is a simple
nice solution.
Like many other situations which need "interruption mechanism" but do
not have it,en,just build a new thread to handle these...
What else needs paying attention to if I do this?
lightning - 23 May 2007 10:57 GMT
Wow,thx for your knowledge!So the tomcat is!
Just a timertask....I thought it may cost too much,but it is a simple
nice solution.
Like many other situations which need "interruption mechanism" but do
not have it,en,just build a new thread to handle these...
What else needs paying attention to if I do this?
lightning - 23 May 2007 10:57 GMT
Wow,thx for your knowledge!So the tomcat is!
Just a timertask....I thought it may cost too much,but it is a simple
nice solution.
Like many other situations which need "interruption mechanism" but do
not have it,en,just build a new thread to handle these...
What else needs paying attention to if I do this?
> Like tomcat,when I put a war into the webapps directory,it starts to
> unzip it.
> How did it do that??
To 'hook' the filesystem you would need a OS kernel extension that
actually /tells/ the application when the FS has changed. There's
something like that for Linux (for instance Beagle uses this kernel
extension) and most probably also for other OS, but that solution
would be highly operation system specific, and you would probably need
JNI to use it at all (guess there's no Java bindings).
If you are just interested in one single directory the much simpler
solution is to have a watcher thread (perhaps a Timer Task) checking
the directory contents periodically.
/philipp
lightning - 23 May 2007 11:07 GMT
> > Like tomcat,when I put a war into the webapps directory,it starts to
> > unzip it.
[quoted text clipped - 12 lines]
>
> /philipp
well,I thought tomcat used jni,but it does not, :)
Yeah,linux , win or solaris all have some function to hook the file
system.
lightning - 23 May 2007 11:07 GMT
> > Like tomcat,when I put a war into the webapps directory,it starts to
> > unzip it.
[quoted text clipped - 12 lines]
>
> /philipp
well,I thought tomcat used jni,but it does not, :)
Yeah,linux , win or solaris all have some function to hook the file
system.
>Like tomcat,when I put a war into the webapps directory,it starts to
>unzip it.
>How did it do that??
see http://mindprod.com/jgloss/filemonitor.html
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com