Re: connection pooling with servlets

Поиск
Список
Период
Сортировка
От Guy Rouillier
Тема Re: connection pooling with servlets
Дата
Msg-id CC1CF380F4D70844B01D45982E671B230137A8FA@mtxexch01.add0.masergy.com
обсуждение исходный текст
Ответ на connection pooling with servlets  ("J." <sweepingoar@yahoo.com>)
Список pgsql-jdbc
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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Jason Porter"
Дата:
Сообщение: Strange Postgres / Tomcat log on error.
Следующее
От: "Jason Porter"
Дата:
Сообщение: Re: connection pooling with servlets