Jason Greene [
http://community.jboss.org/people/jason.greene%40jboss.com] replied to the
discussion
"Thoughts on hot deployment"
To view the discussion, visit:
http://community.jboss.org/message/559791#559791
--------------------------------------------------------------
Ok so, I will first start off by saying that the file system is a *+broken+ API, for many
reasons that I will get into, and that we basically have a bunch of trad*
Dimitris Andreadis wrote:
What is the rationale for the .deployed marker? It's really counter-intuitive. Just
make a copy to avoid locking/classloading issues and leave the original in place.
The main reason was to support reusing information like indexes after a restart.
Also, for exploded deployments have a different META-INF/jboss-deploy
marker to trigger the deployment? Counter-intuitive as well. The whole idea with the
./deploy dir (or whatever is called) is you look there and you know what gets deployed,
you don't need to traverse directories to find out. Or unzip something and it gets
deployed, no need for extra files.
IMO the AS4 model of hot-deployment (no VFS) was the most practival and successful.
People knew that to avoid the "early deployment" problem for large or nested
deployments they just have to do an atomic filesystem mv. Through stuff in and it just
gets deployed, no markers or any other type of magic. I don't see why we need to
re-discover the wheel.
Pretty much exploded deployments have always been broken. The atomic move only solves half
of the problem, the deploy part, and it requires that it be on the same partition of an OS
that supports atomic moves. During undeploy though, removing the directory causes
classloader operations (namely getResource) to fail. This lead to a hack on AS5 where it
would detect if the deployment used seam and then copy the whole thing, and then try to
monitor and copy changed files.
The other issue is how you detect a redeploy operation. Historically this was touching the
TLD, but since EE5 there is no gauranteed TLD (ejb deplyments could be pure annotations).
Further modern frameworks use other descriptors besides the TLD which lead to AS5
detecting a change to ANY file and redeploying. This was a huge problem for our users,
since a change doesn't necessarily mean you want a redeploy and we had to move back to
the AS4 behavior which still doesnt fix the problem, since sometimes you have no way to
cause a redeploy, and it also doesn't handle staged updates to files including the
TLD. The marker though allows for someone to say I really actually want you to redeploy
this.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/559791#559791]
Start a new discussion in JBoss AS7 Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]