[jboss-user] [Management, JMX/JBoss] - Re: Managing JBoss programmatically?

PeterJ do-not-reply at jboss.com
Mon Aug 6 12:13:30 EDT 2007


Two possibilities that I can think of.

1) Because your code is running within the server, you can always look up the name of the deploy directory and then copy the resulting EJB jar file to that directory and let the hot deployer pick it up on the next scan. You can determine the deploy directory name by either getting the jboss.server.base.dir system property and adding 'deploy' to it, or by getting the URLs attribute of the jboss.deployment:type=DeploymentScanner,flavor=URL MBean. To undeploy the JAR you would have to delete it.

2) You could simply create the EJB jar anywhere and then use the deploy() method on the jboss.system:service=MainDeployer MBean to deploy the JAR file where it is. You can call undeploy() on the same MBean to undeploy it.

With method 1, the EJB JAR is redeployed if you restart the server, but with method 2 the EJB jAR is not redeployed on a restart.

If I understand you correctly, the JAR files are custom built, generated on the fly, and possibly used only once. In that case, I would opt for option 2.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071253#4071253

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071253



More information about the jboss-user mailing list