commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Verbeeck <dirk.verbe...@pandora.be>
Subject Re: useServerPrepStmts and jdbcCompliantTruncation for MySQL with dbcp
Date Sat, 18 Jun 2005 10:53:54 GMT
When you want to put a "&" sign in a xml file like server.xml then you 
need to use the &amp; entity.

For example:
<value>
jdbc:mysql://localhost:3306/MYDATABASE?autoReconnect=true&amp;useServerPrepStmts=false&amp;jdbcCompliantTruncation=false

</value>


-- Dirk


Pramodh Peddi wrote:
> Hi,
> 
> I am introducing apache's DBCP tool into our product, which uses MySQL.
> Till now, we used different mysql specific properties in the db url. The
> url we used is:
> "jdbc:mysql://localhost:3306/MYDATABASE?autoReconnect=true&useServerPrep
> Stmts=false&jdbcCompliantTruncation=false". And while making dbcp work,
> this is the exactly the same URL I gave to
> <parameter>
> 
>                         <name>url</name>
> 
>                          <value>jdbc:
> jdbc:mysql://localhost:3306/MYDATABASE?autoReconnect=true&useServerPrepS
> tmts=false&jdbcCompliantTruncation=false </value>
> 
> </parameter> 
> 
>  
> 
> in Tomcat's server.xml. When I start tomcat, it complains saying "The
> reference to entity "useServerPrepStmts" must end with the ';'
> delimiter". And when I removed useServerPrepStmts from the URL, it
> started complaining the same thing about jdbcCompliantTruncation. 
> 
>  
> 
> Can we not use these properties when I use apache's DBCP tool?
> "useServerPrepStmts" can be achieved because DBCP tool itself has
> poolPreparedStatements, which can be defined in server.xml. But what
> about other many useful properties offered by MySQL/MySQL-Connector-J?
> 
>  
> 
> Thanks in advance,
> 
>  
> 
> Pramodh.
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message