1 Reply Latest reply on Dec 31, 2008 6:13 AM by alesj

    How to redeploy an EAR ?

    juergen.zimmermann

      Using JBoss 4.2.3 I used the code below to redeploy an EAR. Well, this also works fine using JBoss 5.0.0. However, is this still the preferred method due to the arrival of the new microcontainer?

      Context ctx = new InitialContext();
      MBeanServerConnection server = (MBeanServerConnection) ctx.lookup("jmx/invoker/RMIAdaptor");
      ctx.close();
      
      server.invoke(new ObjectName("jboss.system:service=MainDeployer"),
       "redeploy",
       new Object[] { "file:/.../myProj.ear" },
       new String[] { "java.lang.String" });


        • 1. Re: How to redeploy an EAR ?
          alesj

           

          "Juergen.Zimmermann" wrote:
          However, is this still the preferred method due to the arrival of the new microcontainer?

          This actually uses MC underneath.

          This would be a job for new ProfileService.
          Dunno what we currently support there. :-)