I am trying to use MainDeployerMBean.deploy(URL) method to deploy a war from a remote system.
code snippet:
String serverURL = "service:jmx:rmi:///jndi/rmi://host:1090/jmxconnector"; JMXServiceURL url = new JMXServiceURL(serverURL); JMXConnector jmxc = JMXConnectorFactory.connect(url, env); MBeanServerConnection server = jmxc.getMBeanServerConnection(); MainDeployerMBean deployerMBean =(MainDeployerMBean)MBeanServerInvocationHandler.newProxyInstance( server, objectName, MainDeployerMBean.class, false); deployerMBean.deploy(new URL("http://localhost:8090/webjars/test.war"));
Deploy throws the following exception
java.io.IOException: No context factory for http://localhost:8090/webjars/test.war
at org.jboss.virtual.VFS.getVFS(VFS.java:232)
I read from here that HTTP urls are not supported. Is there a JIRA report for this ?
Is there any other mechanism that I can use to deploy a war from a remote host/location ?
Thanks,
Srividhya