I disabled the localcopy by specifying the system property jboss.deploy.localcopy=false in run.bat
I created an EAR (Test.EAR) which has the following contents.
The Test.EAR is extracted and the localejb.jar and webtest.war are in compressed format. When I copy Test.EAR to the deploy directory, the application deploys without any problem. But when I try to undeploy the EAR by deleting it, Sharing violation occured from Windows stating that localejb.jar is in use. I am unable to
delete both the localejb.jar and webtest.war.
So I used MainDeployer from the Management Console to undeploy the EAR. The application was undeployed successfully with the following message.
17:40:06,166 INFO [EARDeployer] Undeploying J2EE application, destroy step: file:/G:/JBoss/jboss-3.0.0/server/default/deploy/Test.ear/
17:40:06,176 INFO [MainDeployer] not deleting localUrl, it is null or not a copy: file:/G:/JBoss/jboss-3.0.0/server/default/deploy/Test.ear/webtest.war/
17:40:06,176 INFO [MainDeployer] Undeployed file:/G:/JBoss/jboss-3.0.0/server/default/deploy/Test.ear/webtest.war/
17:40:06,186 INFO [EjbModule] Destroying
17:40:06,206 INFO [EjbModule] Remove JSR-77 EJB Module:
17:40:06,216 INFO [EjbModule] Destroyed
17:40:06,216 INFO [MainDeployer] not deleting localUrl, it is null or not a copy: file:/G:/JBoss/jboss-3.0.0/server/default/deploy/Test.ear/localejb.jar/
17:40:06,226 INFO [MainDeployer] Undeployed file:/G:/JBoss/jboss-3.0.0/server/default/deploy/Test.ear/localejb.jar/
17:40:06,226 INFO [MainDeployer] not deleting localUrl, it is null or not a copy: file:/G:/JBoss/jboss-3.0.0/server/default/deploy/Test.ear/
17:40:06,236 INFO [MainDeployer] Undeployed file:/G:/JBoss/jboss-3.0.0/server/default/deploy/Test.e
But still I am unable to delete the Test.EAR from the deploy directory. It seems that some resources or classloaders are not cleaned up properly.
I am using JBoss 3.0.0 with Tomcat. Is there any other way to update the EAR and redeploy it with the above setting(with localcopy=false and EAR extracted to
only one level)