ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Borrill, Christopher" <Chris.Borr...@hp.com>
Subject RE: Issue with transactions in Oracle 8i
Date Wed, 12 Oct 2005 00:16:00 GMT
Stored procedure calls from Java do not commit unless the stored
procedure contains a commit statement, or you issue connection.commit()
in java.  Make sure auto-commit is off on the JDBC connection as this
will cause exactly the behaviour you are seeing.

Chris 

-----Original Message-----
From: Daniel Henrique Ferreira e Silva [mailto:dhsilva@gmail.com] 
Sent: Wednesday, 12 October 2005 5:32 a.m.
To: user-java@ibatis.apache.org
Subject: Re: Issue with transactions in Oracle 8i

Hi Vincent,

That's a matter of fact: in Oracle, when a stored procedure is executed,
if no exceptions are raised, Oracle automagically commits all data
modified within your procedure, no matter if there is a 'commit'
statement in it.
I'm not an expert on transaction issues, but i think there is a way to
work around this issue.
Maybe one of the other guys here can help you.

Cheers,
Daniel Silva.


On 10/11/05, Vincent NICOLAS <vincent.nicolas@teamlog.com> wrote:
> Hi everybody,
>
> In a very complex transaction, composed with stored procedures and 
> others requests, I can't get the right behavior in case of error. I've

> never had any rollback done. It seems that all the requests in the 
> stored proc are always done, with or without reaching the
> daoManager.commitTransaction() statement.
>
> It is due to stored proc or simply to a bad configuration of iBatis ?
> Any help will be very welcome.
> Thanks.
>
> N.B.
> My configuration is, with a Tomcat 4.1.31 and the following
<sqlMapConfig> :
> <transactionManager commitRequired="true" type="JDBC">
>         <dataSource type="JNDI">
>             <property name="DataSource"
> value="java:comp/env/jdbc/SGO_THIN" />
>         </dataSource>
> </transactionManager>
>
> I've tried with the following without better results :
> <transactionManager type="JDBC">
>       <dataSource type="SIMPLE">
>         <property name="JDBC.Driver"
> value="oracle.jdbc.driver.OracleDriver"/>
>         <property name="JDBC.ConnectionURL"
> value="jdbc:oracle:thin:@graces:1521:SGO"/>
>         <property name="JDBC.Username" value="SGO_DEV"/>
>         <property name="JDBC.Password" value="SGO_DEV"/>
>       </dataSource>
> </transactionManager>
>
> --
> Vincent NICOLAS
> Teamlog, France.
>
>

Mime
View raw message