title: database connection using c3p0
body: <p>Currently in my project the datasource , transactionmanager and other bean required for database connectivity are defined in xml file and there values are configured in property file from which it takes to do the connection.
  for ex:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;bean id="DataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
      destroy-method="close" p:driverClass="${DRIVER_CLASS}" p:jdbcUrl="${DB_URL}"
      p:minPoolSize="${MIN_DB_POOL_SIZE}" p:maxPoolSize="${DB_POOL_SIZE}"
      p:maxStatements="${DB_POOL_SIZE}" p:idleConnectionTestPeriod="${IDLE_CONNECTION_TEST_PERIOD}"
      p:loginTeimeout="${LOGIN_TIMEOUT}" scope="singleton"&gt;&lt;/bean&gt;
  </code></pre>
  
  <p>ALL these like values ${DB_POOL_SIZE} are configured in property file. 
  the class <code>com.mchange.v2.c3p0.ComboPooledDataSource</code> is final class and can't be extended. so my requirement is
  :when spring create the bean of Datasource i should be able to set the value of the variable in xml(DB_URL) from my java file through setter method.
  how to do that?</p>