From: | Dave Cramer <Dave(at)micro-automation(dot)net> |
---|---|
To: | "G(dot)Nagarajan" <gnagarajan(at)dkf(dot)de> |
Cc: | "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: connection pooling and open statement objects |
Date: | 2002-09-09 14:21:42 |
Message-ID: | 1031581303.1903.13.camel@inspiron.cramers |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
You should make sure the statements are closed after processing the
result set.
One more thing, you should make sure that you clear the warnings off of
the connection when you return it to the pool, this can be problematic.
Dave
On Mon, 2002-09-09 at 10:09, G.Nagarajan wrote:
> hi,
>
> In an earlier discussion, someone had remarked that if the statment
> objects are not explicitly closed, the resources allocated to it are not
> released. ie, I have code like this:
>
> - get Connection object from connection pool
> - create statement object
> - create resultset using the statement
> - process the resultset
> - return the connection object to the connection pool
>
> This cycle is repeated for all the sql statements in the application. If
> the
> memory will not be released till the statement object is explicitly closed,
> then it
> might lead to a memory leak later.
>
> any suggestion or remarks are welcome
>
> regards,
> Nagarajan.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2002-09-09 14:22:44 | Re: postgresql-java |
Previous Message | G.Nagarajan | 2002-09-09 14:09:52 | connection pooling and open statement objects |