[ 
http://issues.apache.org/jira/browse/JCR-463?page=comments#action_12439871 ] 
            
Jorge Rodríguez Pedrianes commented on JCR-463:
-----------------------------------------------

I think that the "logout method" (in JCASessionHandle) isn't totally  correct. 
I consider that we must check, before closing session, if this session is 
binded to a transaction. In this situation the session mustn't be closed: 
transaction  will close it.

    public void logout() {
        if 
(!mc.getManagedConnectionFactory().getBindSessionToTrasaction().booleanValue()) 
{
                mc.closeHandle(this);
        }
    }

For example this is very important when we use spring, springmodules (jcr 
module) and jackrabbit because the springmodules library closes session when 
local transaction finishes. And if the session is closed by transaction a 
exception is throwed.

Thanks

> Uncommitted changes or connection leak with Container Managed Transactions
> --------------------------------------------------------------------------
>
>                 Key: JCR-463
>                 URL: http://issues.apache.org/jira/browse/JCR-463
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jca
>    Affects Versions: 1.0, 1.0.1
>            Reporter: Edgar Poce
>         Assigned To: Jukka Zitting
>             Fix For: 1.1
>
>         Attachments: jca-bintToTransaction.diff
>
>
> Apparently the connector doesn't support CMT (container managed 
> transactions). if the jcr session is closed inside a CMT the AS (application 
> server) throws an exception on commit. And if the jcr session is leaved open, 
> the AS commits the TX successfully but it causes a connection leak by leaving 
> the session open.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to