after including tasks example unit tests into target tesexample, they are failing.
An exception is thrown during destroying of BusinessProcess context. For some reason it is not possible to lookup EjbSynchronizations EJB which is required for finishing a transaction (BP context is destroyed in a transaction since r11308)
The issue manifests itself only under the following circumstances:
a) EJB Transactions are used
b) Seam authentication filter is used
c) The following patch is applied http://fisheye.jboss.org/browse/Seam/branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/contexts/Contexts.java?r1=11218&r2=11308
When authentication filter is used, single HTTP request is translated into 2 ContextualHttpServletRequests. The first one parses HTTP Authentication header and invokes identity.authenticate() which stores identity information in session. Note that during end of this contextual request, EjbSynchronizations is succesfully looked up and used for destroying BP context. The problem occurs in the subsequent contextual request (which is the same physical request). In this request, it is not possible to lookup the EjbSynchronizations bean (not from a web service method nor during destroying BP context). Tests fail because there is an exception thrown during EntityHome/Query method invocations. Furthermore, an exception is thrown during BP context shutdown. This exception which is logged with WARN severity (does not cause the test to fail).
To summarize, HTTP request to a web service protected by AuthenticationFilter splits into two separate ContextualHttpRequests. In the second one, it is not possible to lookup EjbSynchronizations bean - Component.getInstance("org.jboss.seam.transaction.synchronizations", ScopeType.EVENT) fails with NoSuchEjbException
I need to verify if only the EjbSynchronizations bean is affected or if any EJB is not usable together with AuthenticationFilter.