Skip site navigation (1) Skip section navigation (2)

Re: Connection and Statement

From: Barry Lind <barry(at)xythos(dot)com>
To: ambre(at)ebutec(dot)com
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Connection and Statement
Date: 2001-11-08 17:34:20
Message-ID: 3BEAC21C.7000007@xythos.com (view raw or flat)
Thread:
Lists: pgsql-jdbc


Erwin Ambrosch wrote:

> Hi All!
> 
> I wonder 2 issues:
> 
> 1. Are there limitations creating statements from a connection.


I don't understand what you are asking here.  Can you explain a little 
bit more?

> 
> 2. When I use a connection pool which keeps all initialized connection 
> open, when is the earliest time I can put  an already retrieved 
> connection back. Can I put the connection back, before I have closed all 
> created statements, or is this not good practice.


This would not be a good idea.  If you return the connection to the pool 
before you are done with all of the statements then the connection is 
available for other processes to use.  If someother process uses the 
connection while you are still using your statements then that other 
process calls commit, it will commit your statements as well since they 
all belong to the same connection.

thanks,
--Barry



In response to

pgsql-jdbc by date

Next:From: Bruce MomjianDate: 2001-11-08 17:37:58
Subject: Re: MD5-based passwords
Previous:From: Christian MeunierDate: 2001-11-08 16:48:15
Subject: Re: Storing a tree

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group