Re: What's the best choice for connection pooling with Struts and PostgreSQL

2003-11-05 Thread Paul Thomas
On 04/11/2003 12:51 ZYD wrote: Thanks Paul, Could you please give me some code snippet about that factory parameter from the server.xml ? Thanks again. bruce ResourceParams name=jdbc/mytestDB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value

Re: [OT] Re: What's the best choice for connection pooling with Struts and PostgreSQL

2003-11-04 Thread ZYD
I found something at http://www.postgresql.org/docs/7.3/static/jdbc-datasource.html Your suggestion is similar to what Struts In Action suggests, on page 125: If your database management system provides its own DataSource that can be used with Struts, you should consider using that

Re: What's the best choice for connection pooling with Struts and PostgreSQL

2003-11-04 Thread ZYD
I tried to use Tomcat's datasource pool via JNDI, but things not going well. I got the following exception when I tried to get connection: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class ' ' for connect URL 'null', cause: java.lang.NullPointerException at

Re: What's the best choice for connection pooling with Struts and PostgreSQL

2003-11-04 Thread Paul Thomas
On 04/11/2003 02:43 ZYD wrote: I tried to use Tomcat's datasource pool via JNDI, but things not going well. I got the following exception when I tried to get connection: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class ' ' for connect URL 'null', cause:

Re: What's the best choice for connection pooling with Struts and PostgreSQL

2003-11-04 Thread ZYD
Thanks Paul, Could you please give me some code snippet about that factory parameter from the server.xml ? Thanks again. bruce You're mising the factory parameter from your server.xml ResourceParams section. BTW, you don't need that stuff in your struts config file if you're using JNDI.

What's the best choice for connection pooling with Struts and PostgreSQL

2003-11-02 Thread ZYD
Dear all, I'm writing my Struts application using PostgreSQL as the backend database. Could you give me some advice on choosing the connection pooling framework/methods? I wrote my own connection pooling classes, but if there are some good frameworks from jakarta, it definitely worth a try.

Re: What's the best choice for connection pooling with Struts and PostgreSQL

2003-11-02 Thread Nick Heudecker
Hi Bruce, I personally prefer C3P0 over DBCP. I've had problems with DBCP in the past, and the support for C3P0 seems to be better. You can find it on Sourceforge. On Sun, Nov 02, 2003 at 08:56:43AM +0800, ZYD wrote: Dear all, I'm writing my Struts application using PostgreSQL as the

Re: What's the best choice for connection pooling with Struts and PostgreSQL

2003-11-02 Thread ZYD
Thanks Nick. What problem did you have with DBCP? bruce - Original Message - From: Nick Heudecker [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, November 02, 2003 11:26 PM Subject: Re: What's the best choice for connection pooling with Struts and

[OT] Re: What's the best choice for connection pooling with Struts and PostgreSQL

2003-11-02 Thread David Graham
--- ZYD [EMAIL PROTECTED] wrote: Dear all, I'm writing my Struts application using PostgreSQL as the backend database. Could you give me some advice on choosing the connection pooling framework/methods? I wrote my own connection pooling classes, but if there are some good frameworks

Re: What's the best choice for connection pooling with Struts and PostgreSQL

2003-11-02 Thread Vic Cekvenich
1. It is a good practice to use the containers data source pool via JNDI. Application servers like Tomcat, Resin, OrionServer, etc all provide a service to the web app of a connection pool. You should not code one, but use one. Ex: Context ctx = new InitialContext(); DataSource ds