-
1. Re: Twiddle - How to undeploy a ear with twiddle
peterj Jan 3, 2007 6:19 PM (in response to ashok_94)You need to place mbean names within double quotes:
twiddle -s localhost:4099 unregister "jboss:J2EEServer=Local,j2eeType=J2EEApplication,name=abcd.ear"
But that only gets rid of one of the MBeans related to your application, it does not necessarily undeploy the application. To do that, you really want to use the 'undeploy' method on the jboss.system:service-MainDeployer mbean. I haven't used that method, but i think that you would pass it the full path name for the ear file. For example:
twiddle -s localhost:4099 invoke "jboss.system:service=MainDeployer" undeploy file:///opt/jboss-4.0.5.GA/server/default/deploy/adcd.ear -
2. Re: Twiddle - How to undeploy a ear with twiddle
ashok_94 Jan 3, 2007 6:47 PM (in response to ashok_94)thanks a ton peter.
I used the --invoke "jboss.system:service=MainDeployer" -- and i was able to undeploy.
then tried to deploy using the same paramters but changing the undeploy to deploy. First i got a ClassNotFoundException : twiddle: java.lang.ClassNotFoundException: org.jboss.deployment.DeploymentInfo.
Tehn i put the jboss-system.jar into tweedle's classpath and now i get this error :
twiddle: java.lang.RuntimeException: No property editor for type: org.jboss.deployment.DeploymentInfo
Any idea about this ?
regards
Ashok -
3. Re: Twiddle - How to undeploy a ear with twiddle
peterj Jan 3, 2007 8:48 PM (in response to ashok_94)That's wierd. There are three overloads to the deploy method. One takes a string, the other a URL, the last one a DeploymentInfo object. It should be attempting to use the URL variant, but it appears that it is trying to use the DeploymentInfo variant. Try again, but without the 'file://' prefix on the file name string.
By the way, since your ear file is in the deploy directory, it might be that the hot deployer, when it wakes up, might automatically redeploy the app. (The undeploy does not delete the file.)
When I have used the deploy method before, my app was not in the deploy directory. For example, I could deploy from /opt/javaee/myapp.ear, and then also undeploy from there. -
4. Re: Twiddle - How to undeploy a ear with twiddle
ashok_94 Jan 4, 2007 2:18 PM (in response to ashok_94)Hi Peter,
i guess i suck.
I looked up the MainDeployer MBean from jmx-console and it had separate operations for deploy, undeploy, redeploy. I tried re-deploy and it worked great.
Thanks again for being such a great help in this matter.
regards
Ashok