ConcurrentAccessException when resolving EL on Stateful bean
------------------------------------------------------------
Key: JBSEAM-4147
URL:
https://jira.jboss.org/jira/browse/JBSEAM-4147
Project: Seam
Issue Type: Bug
Components: Test Harness
Affects Versions: 2.1.1.GA
Environment: jboss as 5.0
Reporter: Sylvain Catudal
How to reproduce:
- Extend EntityQuery and make it a stateful EJB.
- Add a restriction that has EL in it that refers to that EJB
- Create a test that invokes the resultCount or resultList
While running the test, you'll get a ConcurrentAccessException.
Code example :
EJB :
@Name("authenticationList")
@Stateful
public class AuthenticationListBean extends EntityQuery<Authentication>
implements AuthenticationList {
private static final long serialVersionUID = 3302243104496804256L;
private static final String EJBQL = "select authentication "
+ "from Authentication authentication inner join fetch "
+ "authentication.user";
private static final String[] RESTRICTIONS = {
"authentication.user.userId = #{authenticationList.userId}" };
private Long userId;
public AuthenticationListBean() {
setEjbql(EJBQL);
setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
setMaxResults(15);
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getUserId() {
return userId;
}
@Remove @Destroy
public void destroy() {
}
}
Test :
public class FailingTest extends SeamTest {
Long countBefore ;
@Test
public void test() throws Exception {
new FacesRequest() {
@Override
protected void invokeApplication() {
countBefore = (Long) getValue("#{authenticationList.resultCount}");
}
}.run();
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira