Good morning Rickard,
I was playing around with that problem yesterday night. The -remove
everything you dont need anymore- works fine, so the J2eeDeployer would
be ready for that (not in cvs yet).
There I found an other thing: when a MBean service is stopped and I call
one of its business methods it behaves as if it would run. I didnt have
a look at the spec but my feeling says this has to raise an exception?!
Or happens that only (or at all) after service.destroy()?
But back to the discussion:
> The problem with the above is the following sequence:
> * start jBoss
> * auto deploy app
> * stop jBoss
> * update app
> * start jBoss
> At this point the app should be redeployed, but isn't since the auto
> deployer asks the J2EE deployer if it is deployed already, which it is.
Hmmm... you re right.
The other stuff (deployed via the web interface) would work (and _does_
as I tested yesterday).
So it seems the AutoDeployer is the key...
> Hm... maybe the AutoDeployer should store the list of deployments with
> last modified timestamps. That would work! Then it could just read it
> back up when it is restarted and see if the timestamp has changed or
> not!
but I m not a friend of saving state data that is always something that
can break I like it more implizit ;-)
I could imagine to save the timestamp on the J2eeDeployer side (where we
save some metainfo anyway) and add a method like:
Time/Date/long(?) deployedSince (URL) throws Excepiton
Now the AutoDeployer could do the following on startup:
check if already deployed, if yes, check timestamp, if too old: redeploy
Since the server itself and the AutoDeployer run on the same maschine
this should work, but wait what if the AutoDeployer observes a nfs
directory and sombody updates the application but his maschines system
time is one hour back?!
We experienced such funny stuff at SMB where we had our home dirs on nfs
and you changed something (on your maschine) and than you try to compile
it on an other maschine with make and this maschines clock istnt set
properly... bla bla)
But the approach of saving only _one_ metadata I like more.
What do you think (or anyone else)?
\Daniel