All, I've been using the org.apache.commons.dbcp.managed classes for implementing my own XA-capable datasources, and it has been working pretty well (with some minor modifications).
There is one small problem with the classes in the existing state: the BasicManagedDataSource class takes the name of the XADataSource as a string, then instantiates it using a newInstance() on the class in the createConnectionFactory() method--without setting any other properties; this fails in many cases since many XADataSources need properties set before they can function. In my particular case, I've simply added a setProperty(String name, Object value) method to BasicManagedDataSource, and I set these on the newly instantiated XADataSource using BeanUtils.copyProperty(...). Another solution might be creating a XADataSourceFactory interface with a createXADataSource() method that would just return a fully-populated XADataSource. This would be just a standard JavaBean property on BasicManagedDataSource. FYI, Brennan Spies Sr. Programmer Analyst -----Original Message----- From: Phil Steitz [mailto:[EMAIL PROTECTED] Sent: Thursday, December 27, 2007 1:49 PM To: Jakarta Commons Users List Subject: Re: [DBCP] The org.apache.commons.dbcp.managed classes On Dec 26, 2007 2:48 PM, Mark Thomas <[EMAIL PROTECTED]> wrote: > Spies, Brennan wrote: > > Mark, > > > > OK. I guess the source is simple enough that it should not be hard to simply > > use/debug it. I assume that these classes, like DBCP, were also meant to be > > used in a non-app server environment... > Yes, DBCP is supposed to be a general purpose connection pool. > I also assume this but I don't know. > > > Does this mean that they are intended to be released as part of DBCP 1.3? > > Again, I assume so... > > Sorry I can't be more definite. > I am +1 for getting these classes into a 1.3 DBCP release. If someone else wants to step up to put together a release plan and RM a 1.3 release including these classes , I will be happy to help. I would also do the RM work myself, but it will take me a little while, since I am am backed up at the moment with pool 1.4 and math 1.2. Phil > > Mark > > > --------------------------------------------------------------------- > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
