On Wed, 8 Oct 2003 08:54:51 -0400, Bonnie MacKellar <[EMAIL PROTECTED]> wrote:
OK, I see that my questions did get answered. Thanks.
1. On the documentation - yes, reading that section is still unclear. It still seems to say to me that one must set useAutoCommit=0 when using data sources.
I will try to make it more understandable. Any documentation addition, extension, correction are welcome ;-)
Also, a small quibble - but a section heading
for each attribute would be REALLY useful, along with a table of contents.
It is so hard to find the information one needs in the documentation.
I put this on my todo-list. Currently it's a pain building section heading. We are using Maven to generate the docs. Seems we or Maven have problems in creating html-ref (that's the reason for dead links in section heading of online docs).
2. So what you are saying is that if the ConnectionFactory implementation detects that it is using a datasource, it turns off pooling? Is that the case?
yep, see class ConnectionFactoryAbstractImpl line 97. If in jdbc-connection-descriptor attribute 'jndi-datasource-name' is not null, OJB assume using DataSource and do not use connection-pooling.
regards, Armin
Or does something else determine whether it pools or not?
thanks, Bonnie MacKellar
-----Original Message----- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 07, 2003 8:16 PM To: OJB Users List Subject: Re: ConnectionfactoryPooledImpl in Weblogic, was rollback problem
Hi Bonnie,
On Mon, 6 Oct 2003 13:27:44 -0400, Bonnie MacKellar <[EMAIL PROTECTED]> wrote:
> No one answered this, but I did find my problem - I needed to set > useAutoCommit="1" in my repository_database.xml file > is the docmentation in http://db.apache.org/ojb/repository.html#jdbc-connection-descriptor mistakable?
> 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? > yes, because all shipped ConnectionFactory implementation do not pool DataSources. When using DataSource OJB assume that the pooling is done by the emittent of the DataSources.
> Will this cause problems for me down the line? I am feeling very unsure > of > this > configuration. > I don't see any problems in the described situation > ...NOT using EJBs, and NOT using JTA,
regards, Armin
> thanks, > Bonnie MacKellar > > -----Original Message----- > From: Bonnie MacKellar > Sent: Thursday, October 02, 2003 3:54 PM > To: '[EMAIL PROTECTED] ' > 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
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
