Hi!
> hmm, well... let me explain:
>
> > But more troubling is the installApplication() code. I don't understand
> > how your local copy works. First it seems to copy the stuff being
> > deployed into tmp. This is great, since we then don't look the original.
> > But then you don't use it. As a consequence, the other code seems to
> > work on the original so that it becomes locked, which is bad. I thought
> > you should use the localCopy *only* once it had been created.
>
> The localCopy I do currently only to determine the file type (try to
> access the deployment descriptor), after this I try to remove it.
Since you point a URLClassLoader at it I would guess that you will never be
able to remove it. Right?
> Once I know what type I have to deploy, I install it from the original
> source. This doesnt seem smart, especially if we dont have much
> bandwidth. But it was simpler to only pass the original source location,
> which is needed to find libraries referenced by MANIFEST.MF/Class-Path:
> entries in case of ejb or war packages.
> I agree its not a clean solution, so maybe I should change this...
Ok. Yeah you should change to always deploy on the localCopy. This way it is
always possible to put in a new version in /deploy. Right now it doesn't
work very well (about half of my redeployments fail, consistently).
> This is a bug! ...in the AutoDeployer. The AutoDeployer calls the
> J2eeDeployer too early (before the copy (or jar operation) on OS level
> is completed).
No, that's not it. I made the wait longer, and it still appears. It is
something else.
> I ve tried to prevent that by adding 4 lines to the
> AutoDeployer (in its run method): I check the size of the file I m going
> to deploy, wait a second and check it again and only if both sizes are
> equal I do the deployment, else I skip it and try it on the next loop.
> Whether I ve missed something there (?) or its a problem of the
> implementation of java.io.File? I have no idea, currently...
I would guess that all of these problems will go away if you on deploy
*always* make a copy to the /tmp/deploy directory and deploy from there.
Also, if I restart the server, does the J2EE deployer redeploy ones that are
not autodeployed? I.e. if I call deploy() through JMX and then restart, will
it redeploy the package? If it doesn't, it should.
/Rickard