Which version of JBoss AS?
Savas Ali Tokmen wrote:
I'm currently trying to deploy applications to JBoss remotely, via JMX.
That works very well for applications that already are on the server, but I could not find how to upload a WAR, EJB or EAR file to JBoss.
From what I remember, there was never a way through MainDeployer, to deploy applications that resided on remote machines.
Any version of JBoss is fine for me. I want to know if it is possible.
Let me ask you the question in another way: let's assume I have an infrastructure of 100 JBoss servers that I administer using JMX (since that's the Java standard).
Now, I want to deploy an application on these 100 servers. Do I manually need to copy the application on each server, manually?
How do people handle this? Doesn't anyone ever need to remotely deploy an application on to JBoss?
There are many posibilities to deploy remotely on JBoss AS
1) The official JBoss AS 5 API for deployment is the ProfileService's DeploymentManager. For an example of connecting to the ProfileService remotely and deploying a zipped file via the DeploymentManager, take a look at: http://community.jboss.org/wiki/ProfileServiceDeploymentManagerin5x
2) Check also the Arquilian-Project (http://www.jboss.org/arquillian/), which uses DeploymentManager API. I was able to dynamicaly build, upload and deploy an EJBs for JUnit Tests in the remote JBoss AS.
3) Take a look at Cargo-Project (http://cargo.codehaus.org). But there is a limitation, the deployable must be uploaded to the remote server first. I hope, they will fix it some day...
Thank you for your correct and extremely helpful answer.
I'm actually one of the managers in the CARGO team, and the information you provided will be used to make the CARGO JBoss container's remote methods work remotely on JBoss 4.x, 5.x and 6.0.0 Mx. The issue is https://jira.codehaus.org/browse/CARGO-416 and should be fixed in CARGO 1.0.3.
Of course, if you would like to contribute to CARGO with your idea of the implementation, feel free to notify me.
CARGO 1.0.3 is out and can now transparently remote-deploy applications on JBoss AS 4.0.x, 4.2.x, 5.0.x, 5.1.x and 6.x milestones.
You can read more on http://cargo.codehaus.org/JBoss+Remote+Deployer
Dimitri, again thank you for your helpful pointers that helped a lot the CARGO team.
S. Ali Tokmen