-
1. Re: How to remotely deploy a MBean service using JBoss API?
dimitris Sep 14, 2004 3:47 PM (in response to yueming)If you can get to the point of having a connection to the remote MBean server, you can call deploy(URL) on the MainDeployer.
Your archive will be then started from the provided URL
/Dimitris -
2. Re: How to remotely deploy a MBean service using JBoss API?
yueming Sep 15, 2004 11:54 AM (in response to yueming)Thanks, Dimitris! That works!
Yueming -
3. Re: How to remotely deploy a MBean service using JBoss API?
yueming Sep 15, 2004 2:47 PM (in response to yueming)Hi,
MainDeployer.deploy(URL) can deploy a sar remotely, but once when I shut down JBoss and restart, the deployed module by MainDeployer is lost, it seems JBoss won't persist the deployment made by MainDeployer. Am I missing something here? or could somebody shed some lights on?
Thanks,
Yueming -
4. Re: How to remotely deploy a MBean service using JBoss API?
raja05 Sep 16, 2004 2:43 AM (in response to yueming)Yes its not persisted..The deployment state is not stored . The only way possible to have deployments of archives at startup is to store it somewhere accessible to jboss and point that as a deploy directory in jboss-service.xml
-
5. Re: How to remotely deploy a MBean service using JBoss API?
yueming Sep 17, 2004 6:48 PM (in response to yueming)Hi there,
Thanks very much for your previous reply! But I found a problem,
when my client code is running on the same machine with JBoss, everything works fine; if I run JBoss on a different machine, when I use MainDeployerMBean.deploy(URL) (I get the proxy object for MainDeployer from MBeanServerInvocationHandler), it always throws exception:
org.jboss.deployment.DeploymentException: url file:/D:/myservice.sar could not be opened, does it exist?
at org.jboss.deployment.DeploymentInfo.(DeploymentInfo.java:168)
The proxy object seems doesn't transfer myservice.sar to the remote JBoss via RMI. Is there a workaround for this? That is I need deployment happens at the client side, is that possible? Or maybe there is a way I can upload myservice.sar first to the remote JBoss's temporary working folder and then start the deployment using that URL?
I'd appreciate your help very much!
Yueming -
6. Re: How to remotely deploy a MBean service using JBoss API?
genman Sep 17, 2004 9:06 PM (in response to yueming)
The URL you are giving is the one JBoss uses to connect to the client. What you're using is a URL valid only on the client side.
If you want to deploy remotely, the client needs to make the file available remotely somehow. You could create a .jsp which took a file via HTTP and then deployed it. -
7. Re: How to remotely deploy a MBean service using JBoss API?
yueming Sep 20, 2004 10:46 AM (in response to yueming)Thanks for your reply! But could you give an example, I don't know how to use jsp to do the deployment work, is there some document somewhere?
Yueming