Bug 52804 - Make PoolProperties implement Cloneable.
Make PoolProperties implement Cloneable.
Product: Tomcat Modules
Classification: Unclassified
Component: jdbc-pool
All All
: P2 enhancement (vote)
: ---
Assigned To: Tomcat Developers Mailing List
Depends on:
  Show dependency tree
Reported: 2012-03-01 17:18 UTC by Colin McFarlane
Modified: 2012-03-01 20:20 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Colin McFarlane 2012-03-01 17:18:03 UTC
It would be very useful to have the PoolProperties class implement the java.lang.Cloneable interface. 

We have many databases that share the same schema, username, password, configuration etc but differ only in their URL. Implementing a routing datasource based on something like org.springframework.jdbc.datasource.AbstractDataSource can then just clone a PoolProperties object and set the one or two properties that differ in the clone. In a spring project the properties that are common across all the datasources are only supplied once.
Comment 1 Filip Hanik 2012-03-01 20:20:38 UTC
Fixed in trunk in r1295768
Fixed in 7.0.x in r1295770