Ken Geis wrote: > > Hi. For an Avalon application I'm writing, I'm making a data access > layer block. Because of the component nature, that I can switch out > implementations easily, I am trying to make use of JDBC driver specific > features. In specific, I am trying to use PostgreSQL's > Connection.addDataType(), which can be done at connection initialization.
Not very portable. The DataSourceComponent system was designed with one thing in mind: create a portable connection pooling framework that allows only standard access to a standard connection object. > Since the JdbcDataSource returns an opaque JdbcConnection, the only way > I can see to do what I want is to extend or reimplement > JdbcConnectionFactory and JdbcDataSource. This is true. You would also have to specify to the JdbcDataSource to use your modified version. > Does anyone see a better way to do this? Should there be an easier way? I don't see a better way to do it, neither do I really think that should be. Avalon needs to provide standard mechanisms to standards set by Java, if they exist. Any extension to that standard is a risk that developers would have to take. Personally, I don't like being tied to one vendor--proprietary or not. The reason is, if serious security flaws show up with a DB vendor, I want to know I can do a migration and the application will work properly. Also, for proprietary vendors, I refuse to be held hostage to price hikes. Using driver specific extensions increases your risk to possible issues like I just discussed. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
