ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Paul.Smi...@barclayscapital.com>
Subject RE: Ibatis implicit rollbacks
Date Thu, 26 Jan 2006 13:42:17 GMT
I could be completely wrong, so please treat this with sceptisicm.
 
I remember a project a while ago where if you put Exception breakpoints
you would see Oracle performing a rollback and throwing an exception
which was then caught within the Oracle JDBC driver. This is where my
memory fails me, I think it had something to do with closing the
Procedure then closing the ResultSet which would throw saying that it
was already closed, catch and move on. No error would be reported in the
calling Java or on the db server.
 
Unfortunately I don't have an Oracle db avalible right now so I can't
test this theory.

Paul Smith 

	-----Original Message-----
	From: Hilde.DE-GRAEVE@ext.cec.eu.int
[mailto:Hilde.DE-GRAEVE@ext.cec.eu.int] 
	Sent: 26 January 2006 11:33
	To: user-java@ibatis.apache.org
	Subject: RE: Ibatis implicit rollbacks
	
	
	I made the recommended change but still have the same problem.
With a simple query it still does a rollback in oracle there is however
no error in java or oracle.
	 
	To call the query I'm using the follwing code without any
transaction because it is a simple select :
	 
	 
	List docs = null;
	try {
	        docs = (List) sqlMap.queryForList("getquerytest",null );
	        System.out.println(docs);
	   
	      } catch (RuntimeException e) {
	        e.printStackTrace();
	    } catch (SQLException e) {
	        e.printStackTrace();
	   } catch (Exception e) {
	        e.printStackTrace();
	   }
	
	 
	 
	For info my SQLMapConfig has the following properties for the
transaction manager :
	 
	<transactionManager type="JDBC" commitRequired="true">
	<dataSource type="SIMPLE">
	<property name="JDBC.Driver" value="${driver}"/>
	<property name="JDBC.ConnectionURL" value="${url}"/>
	<property name="JDBC.Username" value="${username}"/>
	<property name="JDBC.Password" value="${password}"/>
	<property name="JDBC.DefaultAutoCommit" value="true"/>
	<property name="Pool.MaximumActiveConnections" value="10"/>
	<property name="Pool.MaximumIdleConnections" value="5"/> 
	<property name="Pool.MaximumCheckoutTime" value="5"/> 
	<property name="Pool.MaximumTimeToWait" value="500"/>
	</dataSource>
	</transactionManager>

	Anyone an ideia?

	Thanks,

	Hilde

	 

		-----Original Message-----
		From: Jeff Butler [mailto:jeffgbutler@gmail.com] 
		Sent: Wednesday, January 25, 2006 6:04 PM
		To: user-java@ibatis.apache.org
		Subject: Re: Ibatis implicit rollbacks
		
		
		Are you using an EXTERNAL transaction manager?  If not,
read on...
		 
		iBATIS will start, but not commit, transactions for
selects by default.  If this is happening, some transaction managers
will try to automatically rollback uncommitted transactions.  This
sounds like the kind of problem you are having.  To change this
behavior, specify "commitRequired" on your transaction manage like this:

		 
		<transactionManager commitRequired="true" ....>
		  ...
		</transactionManager>
		 
		Maybe this is the problem?  But this does not apply to
EXTERNAL transaction managers.
		 
		Jeff Butler


		 
		On 1/25/06, Hilde.DE-GRAEVE@ext.cec.eu.int
<Hilde.DE-GRAEVE@ext.cec.eu.int > wrote: 

			Dear, 
			We have an application that uses Ibatis and
Spring. As database we are using Oracle 9. 
			The problem is that for each select we launch
without a transaction, there is a roolback done in oracle. No error
trace in java or Oracle.

			We then created another project where we simply
use the ibatis framework with a junit. We do a simple select and there
also we have the same problem. Oracle performs a rollback.

			We already have several projects where we use
the same configuration, schema , and user and there everything is ok. 
			Is like there is a setting in the project that
provoques the roolback. We also created some other test projects in
other computers/servers and we still have the problem.

			Are you aware of this problem caused by Ibatis?
Could it be a problem with Oracle? 
			Thnak you very much. 
			Best regards, 
			Hilde De Graeve 




------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.

------------------------------------------------------------------------


Mime
View raw message