[jboss-user] [JBoss Cache: Core Edition] - Clumsy JDBC configuration 2.2.0.CR7

mbrade do-not-reply at jboss.com
Wed Aug 27 02:53:08 EDT 2008


I'm configuring the cache using Spring. And I noticed some strange behaviours with the JDBCCacheLoader. I'm using C3p0 for connectionpooling and I have my own ddl for table creation and I rewrote some sqls.

Because there are no setters for all the c3p0 properties I have to use the setProperties method. For all others I wanted to use the setters.

After my first tries. I got severall sql exceptions. Especially on those sqls I haven't wrote on my own. I checked the source code and noticed that the configurer does some default configurations while processing the properties. It creates some default sqls if not set.

Now lets say you use another tablename and use the setter to configure instead of the properties (I need them only for c3p0). the order you call the methods results in different configurations. One that might work and one that doesn't. All the default sqls would be created with the default table name. All others will be overriden by the setter if not specified before.

Wouldn't it be better to have an state for the configuration-Objects. And to have an explicit initialisation task?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4172740#4172740

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4172740

More information about the jboss-user mailing list