### Eclipse Workspace Patch 1.0 #P interceptors Index: src/main/java/org/jboss/ejb3/interceptors/container/ContainerMethodInvocation.java =================================================================== --- src/main/java/org/jboss/ejb3/interceptors/container/ContainerMethodInvocation.java (revision 92829) +++ src/main/java/org/jboss/ejb3/interceptors/container/ContainerMethodInvocation.java (working copy) @@ -85,7 +85,6 @@ public BeanContext getBeanContext() { - assert beanContext != null : "beanContext has not been set"; return beanContext; } #P core Index: src/main/java/org/jboss/ejb3/EJBContainer.java =================================================================== --- src/main/java/org/jboss/ejb3/EJBContainer.java (revision 92846) +++ src/main/java/org/jboss/ejb3/EJBContainer.java (working copy) @@ -968,8 +968,11 @@ // TODO: clean up BeanContainer? //super.cleanup(); + /* + * EJBTHREE-1984: Leave invocations blocked + */ // Restore to pre- create() state - this.allowInvocations(); + // this.allowInvocations(); } @SuppressWarnings("unchecked") Index: pom.xml =================================================================== --- pom.xml (revision 92829) +++ pom.xml (working copy) @@ -404,7 +404,7 @@ org.jboss.ejb3 jboss-ejb3-interceptors - 1.0.3 + 1.0.4-SNAPSHOT Index: src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java =================================================================== --- src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java (revision 92829) +++ src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java (working copy) @@ -258,6 +258,13 @@ public StatefulCache getCache() { + /* + * EJBTHREE-1894 + * Avoid access by multiple threads to createAndStartCache(), which is not + * thread-safe. If called on a stopped container, just return the stopped + * cache instead of creating and starting a new one - which causes more + * problems than it attempts to hide. + * // Ensure initialized try { @@ -267,7 +274,7 @@ { throw new RuntimeException(e); } - + */ // Return return cache; } @@ -548,28 +555,22 @@ //newSi.setAdvisor(getAdvisor()); /* - * Ensure ID exists (useful for catching problems while we have context as - * to the caller, whereas in Interceptors we do not) + * Perform Invocation */ + + // Create an object to hold the return value + Object returnValue = null; + try { - this.getCache().get(sessionId); + // Invoke + returnValue = newSi.invokeNext(); } catch (NoSuchEJBException nsee) { throw this.constructProperNoSuchEjbException(nsee, invokedMethod.getActualClassName()); } - - /* - * Perform Invocation - */ - - // Create an object to hold the return value - Object returnValue = null; - - // Invoke - returnValue = newSi.invokeNext(); - + // Marshall the response response = marshallResponse(invocation, returnValue, newSi.getResponseContextInfo()); if (sessionId != null)