[jboss-jira] [JBoss JIRA] (AS7-4633) Concurrent Access to @SessionScoped @Stateful beans is not serialised if there is no active transaction

Stuart Douglas (JIRA) jira-events at lists.jboss.org
Wed Apr 25 20:29:17 EDT 2012


     [ https://issues.jboss.org/browse/AS7-4633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart Douglas updated AS7-4633:
--------------------------------

           Priority: Critical  (was: Major)
    Forum Reference: https://community.jboss.org/message/732020#732020  (was: https://community.jboss.org/message/732020#732020)

    
> 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
>
> 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

        


More information about the jboss-jira mailing list