1 Reply Latest reply on Aug 27, 2008 12:58 PM by Elias Ross

    Clumsy JDBC configuration 2.2.0.CR7

    Marco Brade Newbie

      Hello

      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?