You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Lin Sun (JIRA)" <ji...@apache.org> on 2009/02/02 15:51:59 UTC

[jira] Updated: (OPENEJB-998) stateful bean managed transaction are not handled correctly

     [ https://issues.apache.org/jira/browse/OPENEJB-998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lin Sun updated OPENEJB-998:
----------------------------

    Attachment: OPENEJB-998.patch

> stateful bean managed transaction are not handled correctly
> -----------------------------------------------------------
>
>                 Key: OPENEJB-998
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-998
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: container system
>    Affects Versions: 3.0
>         Environment: open ejb 3.0 in Geronimo 2.1.4 env.
>            Reporter: Lin Sun
>             Fix For: 3.0.x
>
>         Attachments: OPENEJB-998.patch
>
>
> There are two probs with steteful bean managed transaction in openejb 3.0 -
> 1. The beforeInvoke method in StatefulBeanManagedTxPolicy resumes any transaction, including previously committed or rolled back transaction (in this case, transaction status is Status.STATUS_NO_TRANSACTION).   This has been okay in G 2.1.3 where txmanager 2.1.1 is used.   But in G 2.1.4 (which uses txmanager 2.1.2), we have no longer tolerate this scenario, and will throw an exception.  The fix is to check transaction status here before issue the resume transaction call.
> 2. The afterInvoke method in StatefulBeanManagedTxPolicy cached the currentTx then resumed the client transaction.   Later on, when StatefulContainer called "instanceManager.poolInstance(..)", it would update the beanTransaction again, which would be the client transaction.   The fix is to call the resume client transaction a bit later, when the methodType is REMOVE or Default.
> Will attach a proposed fix for openejb 3.0.x stream shortly

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.