[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Deploying applications programmatically

gav_on_rails do-not-reply at jboss.com
Wed Feb 27 06:18:57 EST 2008


Thanks for your reply! Following your advice I have now successfully deployed a jar and custom archive using the MainDeployer and a custom deployer. For anyone interested here is a code snippet demonstrating looking up the MainDeployer mbean and using this to deploy an archive:


  | 
  | ObjectName objectName = new ObjectName("jboss.system:service=MainDeployer");
  | 
  | MBeanServer server = MBeanServerLocator.locateJBoss();
  | 	    
  | MainDeployerMBean deployerMBean =
  | 	(MainDeployerMBean)MBeanServerInvocationHandler.newProxyInstance(
  |                server, 
  |                objectName, 
  |                MainDeployerMBean.class, 
  |                false);
  | 	    
  | deployerMBean.deploy("file://C:/archives/myArchive.jar");
  | 
  | 

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

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



More information about the jboss-user mailing list