[jboss-dev-forums] [Design of JCA on JBoss] - Re: Allow setAutoCommit(false) on managed connections

adrian@jboss.org do-not-reply at jboss.com
Tue Jul 24 10:53:05 EDT 2007


"bill.burke at jboss.com" wrote : Adrian, you're sounding too much like Mark Little
  | 

That's a complement :-)

anonymous wrote : 
  | setAutomCommit(false); does not change the transactional characteristics of the connection because autoCommit is already false.

We're not talking about the state of the connection, we're talking about when the
commit occurs. Is it, where my code assumes it is in the example I posted above
or is in the JTA transaction demarcation after the method ends (breaking my code!).

By breaking my code, I mean I start another transaction on the connection
or I do something else that requires the transaction committed succesfully.


  | The problem the user is having is that he wants to invoke thirdparty code that he cannot control, with a JTA/JCA managed connection within a transaction. 
  | 

This is broken. I'm not going to break other people's code to make this work
(or more likely lead them to make the same mistakes).

It will also lead to non-portable code. Other appservers won't run it.

If you want to introduce a ManagedConnectionFactory property that does

  | setIgnoreAutoCommitInManagedConnection(true);
  | 
then go ahead. But it needs to be false by default and come with a big
health warning about setting it to true.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067033#4067033

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067033



More information about the jboss-dev-forums mailing list