5 Replies Latest reply on Jul 24, 2007 11:23 AM by Peter Johnson

    access MainDeployer in JBoss 5

    Edith Hofer Newbie

      Hello,

      I'd like to know how to acess the MainDeployer in Jboss 5.

      The Wiki entry (http://wiki.jboss.org/wiki/Wiki.jsp?page=MainDeployer) of the Maindeployer says
      that in JBoss4 the MBean jboss.system:service=MainDeployer can be used to acess the MainDeployer.

      However for JBoss5 it only says that the MainDeployer is now an implementation of the org.jboss.deployers.spi.deployment.MainDeployer interface in JBoss5. See JBoss5DeploymentFramework for details.

      I took a look at JBoss5DeploymentFramework (http://wiki.jboss.org/wiki/Wiki.jsp?page=JBoss5DeploymentFramework) but I did not find what I was looking for.

      Does any one know how to access the MainDeployer?

      Thanks in advance!




        • 1. Re: access MainDeployer in JBoss 5
          Peter Johnson Master

          What kind of access? Programmatic? Administrative? For the latter, see the file server/xxx/conf/bootstrap-beans.xml.

          • 2. Re: access MainDeployer in JBoss 5
            Edith Hofer Newbie

            Thank you for your answer.

            I want to access the maindeployer programatically in jboss 5.

            in Jboss 4 i used tha maindeployer to deploy a war with RMI:

            javax.management.ObjectName maindeployer = new javax.management.ObjectName("jboss.system:service=MainDeployer");
            
            rmiadapter.invoke(maindeployer,"deploy", new Object[] {mywardeploymentinfo}, new String[] {org.jboss.Deployment.DeploymentInfo});


            When I try to do that in JBoss 5, a war deployer is not found.
            And since there is another MainDeployer used in Jboss 5, org.jboss.deployers.spi.deployment.MainDeployer, instead of org.jboss.deployment.MainDeployer, I think I need to find out how to access this new Maindeployer.

            • 3. Re: access MainDeployer in JBoss 5
              Peter Johnson Master

              I used the following twiddle command to successfully deploy a war file:

              twiddle invoke "jboss.system:service=MainDeployer" deploy some.war

              Twiddle performs the same method call that you are using. Therefore I think that here is something else that is going wrong. Which version of JBoss AS 5 are you using? I used beta 2.

              • 4. Re: access MainDeployer in JBoss 5
                Edith Hofer Newbie


                I also use Beta 2.

                when I try to deploy the war with "jboss.system:service=MainDeployer" i get the following error:

                No deployer found for url: file: c:\mywar.war

                When I list the deployers that are registered with the Maindeployer only
                "jboss.system:service=ServiceDeployer" is returned. This means that the other deployers are not yet registered.
                I have to find out how to solve that.

                But its good to know that it should be possible to deploy a war that way ;)

                • 5. Re: access MainDeployer in JBoss 5
                  Peter Johnson Master

                  I would not trust the reply from MainDeployer because in 5.0 all of the deployers are implemented a POJOs within the microcontainer. Even I am getting only the ServiceDeployer as a registered deployer.

                  Shouldn't the URL be something like "file:///c:/mywar.war"? Not sure if that has anything to do with it but when you are grasping at straws...

                  Also, could you try using deploy(String) instead of deploy(URL)?