Hi, I am developing an internal company system for entering and tracking orders. I am using JSP and Servlets using Tomcat. There will be about 30 users using this software constantly - do I need a connection pool and if so do you know where I can get this for free. Is is realistic to write this kind of software and run on Tomcat or should I try to get my company to invest in an Application Server? Any advice would be appreciated Thank you Pamela
I've used this and it worked fine. Mind you the app was never under a lot of stress. But I'd give this one a try before anything else. And my own opinion would be to use what others have worked on (why re-invent the wheel?)
Originally posted by Matthew Phillips: There is an example of using it in Tomcat here.
Hi Mr.Phillips Here is my Working Environment: Windows 2000 Professional J2SDK 1.4 Tomcat 4.0.6 mysql server version: 4.1.0-alpha ( on linux server) JDBCdriver mysql-connector-java-3.0.8-stable-bin.jar I am trying to implement connection pooling as described in http://jakarta.apache.org/tomcat/tomcat-4.1-doc/printer/jndi-datasource-examples-howto.html#MySQL%20DBCP%20Example After modifying server.xml, web.xml and creating connection class and jsp, I start Tomcat through the short-cut which executes startup.bat file. This pops-up tomcat console with all error messages and when I execute shutdown.bat file this window doesn't even close. Could you successfully implement connection pooling as described in above link, if so I would like to know what I am missing? Thank you in advance. Rao Manekar
Whichever way you go, realize the following. When desiging a web app as you have described, it is ALWAYS better to use a pool. I suggest that you ALWAYS get that pool from JNDI as a javax.sql.DataSource object. Many, many other APIs, tools and products are designed to work with either a java.sql.Connection or a javax.sql.DataSource. You use web.xml to define the name of the DataSource you want (via a <resource-ref> tag) and your code is good to go. All that gives you is a .war file that fits the standard. Your code will use an existing DataSource, but not configure one. The configuration of the DataSource is done one of two ways. In a server specific way, you define a DataSource. With tomcat this is done in the server.xml file (last I checked anyway). With many other J2EE servers, there is a GUI to do this (there may be one with Tomcat now). Tomcat does use the Jakarta Commons classes to do this. The other way is to have your app create the connection. This is not recommneded, but once the DataSource is up and running, it works the same way.
Joined: Mar 05, 2001
Dear Kenneth Robinson Thanks for your reply. I still did not get answer to my problem. I gave up working using JNDI. Anyway, I was able to implement connection pooling using coreservlets utility very easily. It is very simple and straigth forward. http://archive.coreservlets.com/Chapter18.html Rao
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com