2 Replies Latest reply on Feb 20, 2012 3:36 AM by markus78

    EJB invocations from a remote server instance and failed deployment if destination is not started

    markus78 Newbie

      When using the existing example for ejb invocations from a remote server instance I need to start my servers in a specific order which is not really something I want to keep track of.


      If the client ServerA (with the EAR that has jboss-ejb-client.xml file in it) happens to start before its destinations ServerB i get the following, and a failed deployment.



      03:34:20,825 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.ejb3.dd-based-ejb-client-context."ExpertClientServer.ear": org.jboss.msc.service.StartException in service jboss.ejb3.dd-based-ejb-client-context."ExpertClientServer.ear": Failed to start service
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_30]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_30]
              at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_30]
      Caused by: java.lang.RuntimeException: Operation failed with status WAITING
              at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:93)
              at org.jboss.as.ejb3.remote.DescriptorBasedEJBClientContextService.createRemotingConnections(DescriptorBasedEJBClientContextService.java:124)
              at org.jboss.as.ejb3.remote.DescriptorBasedEJBClientContextService.start(DescriptorBasedEJBClientContextService.java:86)
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
              ... 3 more



      Is there some way to achive this without having to hard-code the server startup order? The problem is that my deployment is stopped since the EAR has the jboss-ejb-client.xml file and expects that outbound connector of ServerB ref to be up and running when ServerA starts to deploy.


      Can I configure this so that ServerA (client) deploys fine even if ServerB (destination) has not started?