1 2 Previous Next 19 Replies Latest reply on Jul 1, 2006 1:48 PM by Alexey Loubyansky

    JBAS-993 broke the dependency contract

    Scott Stark Master

      The changes associated with the http://jira.jboss.com/jira/browse/JBAS-993 seem to have broken the dependency contract. All entity containers are started by the EjbModule start, but entity containers are not fully initialized until a subsequent iteration that calls startPmAndInterceptors:

       protected void startService() throws Exception
       {
      // Start all ejb containers
       ListIterator iter = containerOrdering.listIterator();
       ArrayList entityList = new ArrayList();
       while( iter.hasNext() )
       {
       Container con = (Container) iter.next();
       log.debug("startService, starting container: " + con.getBeanMetaData().getEjbName());
       serviceController.start(con.getJmxName());
       if(con.getBeanMetaData().isEntity())
       {
       entityList.add(con);
       }
       }
      
      // A second loop to fully start the entity containers.
       if(!entityList.isEmpty())
       {
       for(int i = 0; i < entityList.size(); ++i)
       {
       EntityContainer con = (EntityContainer)entityList.get(i);
       con.startPmAndInterceptors();
       }
       }
       }
      


      The first loop should not be starting the entity containers as this breaks the dependency contract. This is showing up in a support case where porting an app to 4.0.4.GA is showing "createBeanClassInstanceCommand == null" errors when an entity is accessed, but the interceptors and pm have not been started.


        1 2 Previous Next