[
https://issues.jboss.org/browse/AS7-4633?page=com.atlassian.jira.plugin.s...
]
Tony Herstell commented on AS7-4633:
------------------------------------
I believe I have a >>small<< project that shows it on startup (showing the
very first landing page in fact)...
If it would help; I can provide access.
Project is even Mavanised in Git.
The problem, as yet, seems to have no bad side effects other than to fill up the logs.
I will test in 7.1.2.Final when it's out (unless someone gives me somewhere to get it
from)... Win 7 64.
Concurrent Access to @SessionScoped @Stateful beans is not serialised
if there is no active transaction
-------------------------------------------------------------------------------------------------------
Key: AS7-4633
URL:
https://issues.jboss.org/browse/AS7-4633
Project: Application Server 7
Issue Type: Bug
Components: EJB
Affects Versions: 7.1.0.Final, 7.1.1.Final
Environment: Linux Ubuntu 11.10, Sun JDK & JRE 1.6.0_26 Java(TM) SE Runtime
Environment (build 1.6.0_26-b03) Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed
mode)
Reporter: James Fellows
Assignee: Stuart Douglas
Priority: Critical
Fix For: 7.1.2.Final (EAP)
Concurrent calls to @Stateful @SessionScoped beans in the absence of a transaction (for
example where the method being invoked is annotated
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) are not serialized and (I
believe) they should be, byt the container. Concurrent access to the same method
annotated @TransactionAttribute(TransactionAttributeType.REQUIRED) IS serialised
correctly.
Moreover, when concurrent access to the bean occurs in the absence of a transaction, no
errors are logged - the instance is simply removed from the pool leading to
NullPointerExceptions on subsequent calls (from any thread).
I have looked at the unit tests for
org.jboss.as.ejb3.component.stateful.StatefulSessionSynchronizationInterceptor (which is
where I believe the issue lies - see explanation in the forum), but I really don't
understand it. I'm not familiar with Mockito, but as far as I can tell the
functionality is only tested during Bean and Container Managed transactions, not in their
absence.
The problem can be recreated in an integration-test scenario by making multiple
concurrent calls to a @Stateful @sessionScoped bean. In my case my app makes the calls
from @Stateless JAX-RS services.
In the world of AJAX and tabbed browsing I believe this issue to be significant. I
suspect transaction-less calls will become more common as people get used to the
@PersistenceContext(type=PersistenceContextType.EXTENDED) EntityManagers and the
flexibility they allow (it's heavily featured in Adam Bien's Rethinking J2EE
Patterns book). There have been some discussions on StackOverflow of people trying to
figure out the issue, but only very few.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira