5 Replies Latest reply on Sep 2, 2010 4:48 PM by alitokmen

    Deploy a file to JBoss via JMX ?

    alitokmen

      Hello

       

      I'm currently trying to deploy applications to JBoss remotely, via JMX. Right now, I'm using the jboss.system:service/MainDeployer MBean's deploy method. That method gets as parameter a java.net.URL.

       

      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.

       

      Anyone would have ideas?

       

      Cheers

        • 1. Re: Deploy a file to JBoss via JMX ?
          jaikiran

          Which version of JBoss AS?

           

          Savas Ali Tokmen wrote:

           

          Hello

           

          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.

          • 2. Re: Deploy a file to JBoss via JMX ?
            alitokmen

            Hello

             

            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?

            • 3. Re: Deploy a file to JBoss via JMX ?
              alexeev

              Hello,

               

              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...

              • 4. Re: Deploy a file to JBoss via JMX ?
                alitokmen

                Hello Dimitri

                 

                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.

                 

                Cheers

                • 5. Re: Deploy a file to JBoss via JMX ?
                  alitokmen

                  Hello everyone

                   

                  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.

                   

                  Cheers

                   

                  S. Ali Tokmen

                  http://ali.tokmen.com/