2 Replies Latest reply on Jun 21, 2007 3:50 PM by jmp

    Hot Farm deployment during client requests

    jmp

      Hi there,

      I have 2 JBOSS AS 4.2 in clustering environement with farm deployment enabled.

      If i deploy my ear while client is requesting i have a cluster invocation failed during deployment.

      This is my client code :

      Properties properties = new Properties();
      properties.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
      properties.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
      properties.put("java.naming.provider.url","server1:1099;server2:1099");
      
      Context context = new InitialContext(properties);
      MyBeanRemote beanRemote = (MyBeanRemote)context.lookup("myapp/MyBeanRemote/remote");
      
      for (int j=0;j<100000;j++){
      //I deploy my ear during this loop
       beanRemote.sampleMethod();
      }




      Have you got an idea ?
      Is it possible to deploy an ear without affect clients requests ?


      Regards,

        • 1. Re: Hot Farm deployment during client requests
          brian.stansberry

          A difficulty with farm is it will likely redeploy the ear on all nodes in the cluster pretty much simultaneously. This leaves you with no servers able to handle the request.

          Suggest you try developing a script that can sequentially deploy your ear to the deploy dir in the different nodes in the cluster.

          • 2. Re: Hot Farm deployment during client requests
            jmp

            Thank you very much Brian for your reply.

            There is no option in farm to deploy sequentially ear ?

            Script is a good idea and it works, but I wanted something to enjoy farm aspects.
            Is there any way with java code to see when the deployment is finished ?

            Regards,