3 Replies Latest reply on Sep 8, 2010 11:11 AM by boblepepeur

    MainDeployer listDeployed returns empty list

    swiderski.maciej

      Hello,

       

      I ran into very weird issue. I amtrying to use jmx-console to get information about deployed resources (mainly applications).

       

      When going to jboss.system:service=MainDeployer and invoking listDeployed or listDeployedModules operation it always returns empty list.

       

      I am running on JBoss 5.1.0GA with default configuration and it contains only standard applications (admin-console, web-console, jmx-console) and my very simple web application.

       

      Doing the same on JBoss 4.2.3 returns huge list of resources.

       

      Any ideas? What is wrong with my setup or is there any other way of getting such information via JMX?

       

      Thanks a lot

      Maciej

        • 1. Re: MainDeployer listDeployed returns empty list
          emuckenhuber

          The jboss.system:service=MainDeployer is deprecated in AS5++. It only returns URLs which were explicitly deployed over it.

           

          In the jmx-console you might want to use the DeploymentScanner MBean for now.

          • 2. Re: MainDeployer listDeployed returns empty list
            swiderski.maciej

            Thanks for information.

             

            DeploymentScanner returns only urls of the deployed resources. How to get access to MBean for these resources?

             

            Thanks

            Maciej

            • 3. Re: MainDeployer listDeployed returns empty list
              boblepepeur
              synchronized static public void redeployProject(String _project)
              {
              System.out.println("redépoiement manuel de "+_project);
              try
              {
              InitialContext ctx = new InitialContext(); // From jndi.properties
              ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
              org.jboss.deployers.spi.management.deploy.DeploymentManager deploymentManager = ps.getDeploymentManager();
              DeploymentProgress redeploy = deploymentManager.redeploy(_project);
              redeploy.run();
              }
              catch (Exception e)
              {
              e.printStackTrace();
              System.out.println("Impossible de redéployer l'application "+_project+".");
              }
              }

              if that can help some one :

               

              synchronized static public void redeployProject(String _project)

              {

              System.out.println("redépoiement manuel de "+_project);

               

              try

              {

              InitialContext ctx = new InitialContext(); // From jndi.properties

              ProfileService ps = (ProfileService) ctx.lookup("ProfileService");

              org.jboss.deployers.spi.management.deploy.DeploymentManager deploymentManager = ps.getDeploymentManager();

               

              DeploymentProgress redeploy = deploymentManager.redeploy(_project);

              redeploy.run();

              }

              catch (Exception e)

              {

              e.printStackTrace();

              System.out.println("Impossible de redéployer l'application "+_project+".");

              }

              }

               

               

              _projet = "yourproject.war"

              that's work with jboss6 and i think 5 too