Re: JDBC caching plpgsql function errors?

Поиск
Список
Период
Сортировка
От Jim Steinberger
Тема Re: JDBC caching plpgsql function errors?
Дата
Msg-id 20040430184807.6C71722BC8F@inetsrv07.digitalrealm.net
обсуждение исходный текст
Ответ на Re: JDBC caching plpgsql function errors?  (Paul Thomas <paul@tmsl.demon.co.uk>)
Список pgsql-general
[snip]
Are you storing anything in session scope which might cause the function
to be cached?

No -- when the SUBMIT button is pressed, a bean is instantiated, the bean's
properties are set based on the HTML form, and then the bean's "insert"
method is called.  The "insert" method gets a connection from Tomcat's
connection pool, uses it to create a PreparedStatement, and then uses the
bean's properties to set the PreparedStatement's parameters.  It executes
the statement, and finally closes the PreparedStatement and then the
Connection (in a finally { } block) before leaving the method.

So, nothing's being stored in the session -- the bean, PreparedStatement,
and Connection objects are all created and destroyed/closed in the scope of
the request.


However, it is possible that each request is using the same database
connection, since each request closes the connection it used, returning the
connection to Tomcat's connection pool.  Even if the connection is the same,
however, the specific PreparedStatement should have gone away when it was
closed, shouldn't it have?  And even if it cached the PreparedStatement,
why/how would it be able to cache Postgres's response to it?


So confused,
Jim


-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Paul Thomas
Sent: Friday, April 30, 2004 2:01 PM
To: Jim Steinberger
Cc: pgsql-general @ postgresql . org
Subject: Re: [GENERAL] JDBC caching plpgsql function errors?


On 30/04/2004 17:34 Jim Steinberger wrote:
> [snip]
> Anyone have any ideas?  I /think/ I worked around this same problem a few
> months ago by restarting the server, but clearly I shouldn't have to do
> that
> every time I modify a function.

Are you storing anything in session scope which might cause the function
to be cached?


--
Paul Thomas
+------------------------------+--------------------------------------------
-+
| Thomas Micro Systems Limited | Software Solutions for
Business             |
| Computer Consultants         |
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+--------------------------------------------
-+

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: TCP only listening on localhost???
Следующее
От: "Ian Harding"
Дата:
Сообщение: Re: synchronizing MS access and postgresql tables