Re: connection pooling with servlets

From: "Jason Porter" <Jason(dot)Porter(at)student(dot)neumont(dot)edu>
To: "Guy Rouillier" <guyr(at)masergy(dot)com>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: connection pooling with servlets
Date: 2006-04-28 20:25:05
Message-ID: 1C47F9167B873F489B45243528C5EF03B4AA12@studentmail.Student.Northface.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I've fixed the problem. Looked like there was a conflict between the
MyApp.war/META-INF/context.xml and the
Tomcat/Catalina/localhost/MyApp/context.xml

Thanks for the reply.

> -----Original Message-----
> From: pgsql-jdbc-owner(at)postgresql(dot)org [mailto:pgsql-jdbc-
> owner(at)postgresql(dot)org] On Behalf Of Guy Rouillier
> Sent: Friday, April 28, 2006 13:33
> To: pgsql-jdbc(at)postgresql(dot)org
> Subject: Re: [JDBC] connection pooling with servlets
>
> J. wrote:
> > I am a novice, but thought it would make more sense to post this
> > here. I'm trying to write a basic webstore app for a school project
> > and I'm having trouble getting more than one servlet to access the
> > database connection. I tried the method described on the PostgreSQL
> > site - as I understood it. That entailed opening a connection in
one
> > servlet and then having code like this in other servlets that need
> > connections:
>
> Don't attempt to put your datasource in the session. Use a database
> pool instead, and then just do a JNDI lookup to obtain a connection
> wherever you need it. If you are using Tomcat as your servlet
> container, it has built-in support for datasources. Post back if you
> need help in configuring that.
>
> --
> Guy Rouillier
>
> ---------------------------(end of
broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2006-04-29 00:09:00 Re: OutOfMemory causing connection leaks
Previous Message Guy Rouillier 2006-04-28 19:32:41 Re: connection pooling with servlets