db-ojb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bonnie MacKellar <BMACK...@mobius.com>
Subject ConnectionfactoryPooledImpl in Weblogic, was rollback problem
Date Mon, 06 Oct 2003 17:27:44 GMT
No one answered this, but I did find my problem - I needed to set
useAutoCommit="1" in my repository_database.xml file
 
However, I need to understand something. If I am running in Weblogic, using
a connection pooled data source, 
but NOT using EJBs, and NOT using JTA, is it safe to use
ConnectionFactoryPooledImpl?
Will this cause problems for me down the line? I am feeling very unsure of
this
configuration.
 
thanks,
Bonnie MacKellar

-----Original Message-----
From: Bonnie MacKellar 
Sent: Thursday, October 02, 2003 3:54 PM
To: 'ojb-user@db.apache.org '
Subject: rollback problem




Hi, 

I have a simple two step transaction, in which two inserts occur. I am using
PB broker, with OJB transactions. I am connecting to a data source in
Weblogic. I am using rc4.

When a rollback occurs, the first record inserted in the transaction is not
removed. This is very incorrect, of course. I looked back in the archives
for this list, and found a message saying not to use
ConnectionFactoryManagedImpl if you are using OJB transactions. Fine. So I
switched to ConnectionFactoryPooledImpl. But the problem remains. Is there a
known problem with this?

My code is 
     try 
        { 
            broker.beginTransaction(); 
            
            broker.store(customer); 
            broker.store(audit); 
            
            broker.commitTransaction(); 
            
        } 
        catch (Exception e) 
        { 
            broker.abortTransaction(); 
            logger.error(e.getMessage()); 
        } 
    } 

I am attaching my ojb.properties as well. 

Thanks, 
Bonnie MacKellar 




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message