This one time, at band camp, Marc Guillemot said:
MG>I want to configure a Datasource for mySql using
MG>org.apache.commons.dbcp.BasicDataSource (without jndi):
MG>
MG><database name="jn" engine="mysql">
MG> <data-source class-name="org.apache.commons.dbcp.BasicDataSource">
MG> <params username="@db.user@"
MG> password="@db.password@"
MG> driverClassName="@db.driver@"
MG> url="@db.url@"
MG> maxActive="10"/>
MG> </data-source>
MG>
MG> <mapping href="castor-mapping.xml" />
MG></database>
MG>
MG>but I get a:
MG>java.sql.SQLException: Cannot load JDBC driver class 'null'
MG>
MG>in fact tracking what has been set, I've found that the BasicDataSource has
MG>been correctly instantiated but that only the fields username, password and
MG>url have been set (ie driverClassName and maxActive are ignored).
MG>
MG>Is there a solution to make Castor take all params into account?
Marc,
Castor has no knowledge of all the options available for all JDBC
Driver/DataSource implementations in the wild. My suggestion is to make
use of a properties file that the JDBC implementation will recognize.
If this isn't supported, please let me know. Maybe I can add some hooks
to allow for custom properties to be set in the castor.properties file.
Bruce
--
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev