When I use BoneCP in per-web-app, it is OK with partitionCount . "partitionCount " is a property of BoneCP. MySQL Connector/J 5.1.19, I put it into both Tomcat's lib/ directory and my webapp's WEB-INF/lib directory . (I can have a try. I think it doesnot work : > you'll need to have the JAR files for MySQL Connector/J *and* BoneCP in Tomcat's > lib/ directory and *not* in your webapp's WEB-INF/lib directory. )
On Wed, May 2, 2012 at 10:48 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Zuxiong, > > On 5/2/12 3:09 AM, zuxiong lin wrote: > > In Tomcat 7 , conf/server.xml -> GlobalNamingResources <!-- BoneCP > > datasource --> <Resource acquireIncrement="2" auth="Container" > > driverClass="com.mysql.jdbc.Driver" * > > factory="com.jolbox.bonecp.BoneCPDataSource"* > > idleMaxAgeInMinutes="600" jdbcUrl="jdbc:mysql:// > > 10.20.216.18:3306/SoftmgrV3?useUnicode=true&characterEncoding=UTF-8" > > > > > lazyInit="false" maxConnectionsPerPartition="100" > > minConnectionsPerPartition="3" name="jdbc/SoftmgrV3" > > partitionCount="2" password="root" releaseHelperThreads="2" > > type="com.jolbox.bonecp.BoneCPDataSource" username="root" /> > > I suspect that "partitionCount" and friends might not work. You might > instead want to set those as attributes in your URL. I don't used a > partitioned MySQL, so I'm really not sure. I would double-check the > documentation for MySQL Connector/J. > > > *But Excpeiotn:* exception > > > > org.springframework.web.util.NestedServletException: Request > > processing failed; nested exception is > > org.springframework.transaction.CannotCreateTransactionException: > > Could not open JDBC Connection for transaction; nested exception > > is org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create > > JDBC driver of class '' for connect URL 'null' > > Where is your mysql-x.y.z.jar file? > > Since you are using Tomcat to manage your connection pool, you'll need > to have the JAR files for MySQL Connector/J *and* BoneCP in Tomcat's > lib/ directory and *not* in your webapp's WEB-INF/lib directory. > > Hope that helps, > - -chris > -----BEGIN PGP SIGNATURE----- > Version: GnuPG/MacGPG2 v2.0.17 (Darwin) > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk+hSU4ACgkQ9CaO5/Lv0PDbbACeL1pxxn+SI/v10o6Yngxf60yy > OrUAn1DwTz6tZypOUYpUJU+Co7x5t5tU > =phDH > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >