geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chua Chee Seng <chuacheesen...@gmail.com>
Subject Transaction problem using Spring 2 Transaction + Oracle Data Source
Date Wed, 26 Sep 2007 08:48:35 GMT

Hi all,

I am facing problem when using Spring 2 Transaction with Oracle Data Source. 
The following are the version of components that I am using:-

i)   JDK (Sun 1.6.0_02)
ii)  Geronimo 1.1.1
iii)   spring.jar (version 2.0.6)
iv)  aspectweaver.jar, commons-dbcp.jar, commons-logging.jar,
commons-pool.jar (come with spring distribution)
v) ojdbc6.jar (Downloaded from Oracle 11g database driver)

I have deployed a Oracle Data Source called 'TestDataSource' using Console. 
I then deployed the testoracle application which contains a TestBean.  The
TestBean contains a insertData() method which uses Spring JDBC to write a
record into 'kz_id' database table.  The 'kz_id' table has two columns
called 'id' (varchar2 type) and 'current_value' (number).  Spring
Declarative transaction management is used to commit/rollback the
transaction.  TestServlet get the TestBean from the Spring context and call
the insertData() method.  I have enabled the logging to see what Spring does
with the transaction.

Once TestServlet is accessed, I can see from the log that Spring is starting
the transaction and commit it when it is done.  It seems to have committed
successfully.  But I am not able to see the data from other Oracle client,
for example using sqlplus.  To double comfirm that the transaction is not
committed properly, I tried to update the related row, which it hang.  I
also query the v$transaction view and see 1 increment after the TestServlet
is accessed.  Once Geronimo is shutdown, the data is visible to other
clients and count in v$transaction is decreased.

I first think it is the problem of the Oracle driver, however, if I use
apache DBCP's BasicDataSource instead of data source managed by Geronimo, it
works fine!  This makes me wonder whether the problem can come from tranql
or Geronimo data source?

Honestly, I do not know the cause,  I would really appreciate for any helps
to clarify this.

I attach the web app for your reference.

http://www.nabble.com/file/p12896626/testoracle.zip testoracle.zip 

Thanks.

Best Regards,
Chee Seng

-- 
View this message in context: http://www.nabble.com/Transaction-problem-using-Spring-2-Transaction-%2B-Oracle-Data-Source-tf4520875s134.html#a12896626
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message