6 Replies Latest reply on Nov 12, 2007 3:09 PM by wolfgangknauf

    Accesing JBoss5 MainDeployer from

    wolfgangknauf

      Hello everybody,

      I try to extend the "file copy" deployment of eclipse/webtools by writing a tool that queries the MainDeployer and waits until deployment is finished.

      In JBoss 4.x, I could do this by accessing the "jboss.system:service=MainDeployer" MBean.

      In JBoss 5, this seems to have changed: http://wiki.jboss.org/wiki/Wiki.jsp?page=MainDeployer

      Can somehow tell me whether and how I can access this new deployer from a standalone application client ?

      Thanks

      Wolfgang

        • 1. Re: Accesing JBoss5 MainDeployer from
          jaikiran
          • 2. Re: Accesing JBoss5 MainDeployer from
            wolfgangknauf

            Hi Jaikiran,

            unfortunately this does not help, because there they talk only about the MainDeployer MBean, which seems to cause problems. But the initial question of how to access the MainDeployer POJO is not answered :-(.

            Even if my app is deployed and I use the jmx-console to display all deployed apps, I do not see anything. So it seems that the MainDeployer MBean is "dead".

            Best regards

            Wolfgang

            • 3. Re: Accesing JBoss5 MainDeployer from
              wolfgangknauf

              I managed to deploy and query the deployment state with the "old" MainDeployer MBean, and this are my findings:

              The ear file is on path "C:\temp\jboss-5.0.0.Beta2\server\default\deploy\Stateless.ear".

              For the "deploy"/"undeploy"/"redeploy" methods, this URL is needed (VFSFILE URLs won't work):
              file:/C:/temp/jboss-5.0.0.Beta2/server/default/deploy/Stateless.ear
              (Backslashs works also).

              For "isDeployed", a VFSFILE URL is required ("FILE" URL won't work !)
              vfsfile:/C:/temp/jboss-5.0.0.Beta2/server/default/deploy/Stateless.ear
              (Backslashs won't work here).

              Seems like a bug, but I don't know whether the MBean is to supported in future versions.

              Still the question: how can I query the "new" MainDeployer from an application client ?

              Wolfgang

              • 4. Re: Accesing JBoss5 MainDeployer from
                jaikiran

                Sorry, i wont be of much help here :-(
                I haven't tried anything on JBoss5 yet.

                • 5. Re: Accesing JBoss5 MainDeployer from
                  peterj

                  Wolfgang, I should warn you that there are many deployment issues in Beta2 (even the current 'trunk' has issues). Those will hopefully all be resolved by the time 5.0 hits GA. But between now and then, I expect that a lot of the deployment mechanisms will change to fix the current set of issues. In other words, even if you could figure out how to get the info you need now, by the time GA hits the streets it will probably all have changed and you will have to recode everything.

                  • 6. Re: Accesing JBoss5 MainDeployer from
                    wolfgangknauf

                    Thanks Peter. Well, my deployer is just a bit of playing around, so I won't loose much if I had to rewrite it ;-).
                    Currently, it seems that it won't work. Updating an EAR file is impossible because the server keeps the file handle open, even if it undeployed.

                    Anyway, the JBoss developers will have a concept of a JBoss 5 server, so I hope that someone of them reads this post.

                    Wolfgang