From: Alex <ale...@go...> - 2003-03-06 08:38:34
|
i didn't find any other mailing list to post my questin to, so, i post it here, it may be off topic... i wanna use Proxool 0.7 into tomcat, but i can't understand how does it work. i've configured web.xml for my context to load ServletConfigurator at context startup. 1. when i request a connection, using: Class.forName("org.logicalcobwebs.proxool.ProxoolDriver"); try { connection = DriverManager.getConnection("proxool.example" + ":com.mysql.jdbc.Driver" + ":jdbc:mysql://192.168.17.17:3306/testdb?user=tomcat&password=tomcat&autoRec onnect=true"); ............. , a pool is being created and it return a connection. So, the connection pool is being created at the first DriverManager.getConnection(....) request ? If the pool named 'example' doesn't exists, it creates a new one ? 2. When i run again that code, it doesn't create a new pool, it uses the 'example' pool and returns a connection from that pool. How does proxool knows that 'example' pool exists ? (maybe this is a pretty stupid question, but i don't get it) 3. Is there any way to reference the pool object ? because i don't wanna use: Class.forName("org.logicalcobwebs.proxool.ProxoolDriver"); try { connection = DriverManager.getConnection("proxool.example" + ":com.mysql.jdbc.Driver" + ":jdbc:mysql://192.168.17.17:3306/testdb?user=tomcat&password=tomcat&autoRec onnect=true"); every time i request a new connection. Is there any way to use something like this: a) create a new pool at context startup b) get connections from that pool like this: pool.getConnection(poolName[,...]); c) shutdown that pool at context shutdown ? Thanks in advance... Alex |