Jason Greene [
http://community.jboss.org/people/jason.greene%40jboss.com] created the
discussion
"Re: Thoughts on filesystem action driven hot deployment"
To view the discussion, visit:
http://community.jboss.org/message/560295#560295
--------------------------------------------------------------
Todd Trimmer wrote:
I've been experiencing a problem with atomic moves in AS5 under Windows. About twice
a day, AS5's JVM refuses to release a file handle to META-INF/application.xml or an
EJB descriptor file. I cannot swap out the old exploded archive when this happens. This is
perplexing since it's not like AS5 is hung. All my apps are still working fine.
In light of this, I would much rather have to touch/copy/delete a marker file than rely
on atomic moves.
Thanks for the feedback. The locking semantics on windows are
certainly a major problem with the current approaches. So assuming we fixed the access to
descriptors, to not hold locks (the correct behavior), delete-undeploy could still fail if
there are web requests coming in. Servicing the request requires reading the file, which
holds a lock. Granted there is a short lifespan, but all it takes is one happening at the
same time to prevent the move.
Also, while I'm sure the HDScanner is performant, the amount of
juggling it has to do seems like a convoluted solution for what shouldn't be such a
big problem. But then again, if it were that easy, this thread wouldn't even exist.
Yeah we want to limit this to be as simple and clean as possible. If we make this
more "correct" then we can speed up the scanning time. Part of the reason it
ends up with low values is to hide the various race problems. Ultimately though we are
limited by what the FS gives us.
Another thing AS7 will have is a CLI, which would be more explicit, intuitive, and
immediate e.g. "deploy blah.ear, redeploy blah.ear, undeploy blah.ear". This
could even have a maven, or ant plugin on it.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/560295#560295]
Start a new discussion in JBoss AS7 Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]