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

    How to redeploy an EAR ?

    Juergen Zimmermann Master

      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");
      server.invoke(new ObjectName("jboss.system:service=MainDeployer"),
       new Object[] { "file:/.../myProj.ear" },
       new String[] { "java.lang.String" });