jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edgar Poce (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JCR-463) Uncommitted changes or connection leak with Container Managed Transactions
Date Fri, 16 Jun 2006 02:19:30 GMT
     [ http://issues.apache.org/jira/browse/JCR-463?page=all ]

Edgar Poce updated JCR-463:

    Attachment: jca-bintToTransaction.diff

The proposed patch *OPTIONALLY* binds the jcr session handle to the active transaction. When
the tx is committed the session handle will be closed. The transaction will fail if the session
is closed inside a transaction.

The behaviour for CMT is different from the one described in the JCR specification (8.1.1),
the logout call specifically.  
The logout should be permitted but it should be ignored when it's inside a transaction? feedback
is welcome.

CMT (container managed transactions):
	public void test() throws Exception {
		InitialContext ctx = new InitialContext() ;
		Repository repo = (Repository) ctx.lookup("java:jcr/local") ;
		Credentials cred = new SimpleCredentials("ed",new char[]{'e','d'}) ;
		Session s = repo.login(cred) ;
		s.getRootNode().addNode("node") ;

BMT (bean managed transactions) behaves the same as before
	public void test() throws Exception {
	        utx.begin() ;
		InitialContext ctx = new InitialContext();
		Repository repo = (Repository) ctx.lookup("java:jcr/local");
		Credentials cred = new SimpleCredentials("ed", new char[] { 'e', 'd' });
		Session s = repo.login(cred);
		utx.commit() ;
		s.logout() ;

> Uncommitted changes or connection leak with Container Managed Transactions
> --------------------------------------------------------------------------
>          Key: JCR-463
>          URL: http://issues.apache.org/jira/browse/JCR-463
>      Project: Jackrabbit
>         Type: Bug

>   Components: jca
>     Reporter: Edgar Poce
>  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:
For more information on JIRA, see:

View raw message