1 Reply Latest reply on Mar 22, 2009 3:15 AM by jaikiran

    Service POJO redeployment on AS 5.0.1

    tbenbrahim

      I have 2 service beans, A and B. A depends on B and B is injected into a field of A. Deployment is normal, when start() is called on A, the @Depends field that holds a reference to B has been set as expected.

      The problem happens when B is redeployed. Since A depends on B, it is undeployed along with B. B is redeployed, then A is redeployed, then A.start() is called. This time the field that holds a reference to B is null, dependency injection did not happen! Is this expected?

      To try to work around the problem, I tried to lookup the service manually from the MBeanServer, in A's start() method. I get an IllegalStateException, "classLoader is not connected to a domain (probably undeployed?) for class org.jboss.mx.util.MBeanProxyInstance"

      Totally stuck at this point, what I am missing? or is redeployment not working?

      Thanks in advance

      Tony