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

prepareCall hangs

From: Akhil Srinivasan <akhilss(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: prepareCall hangs
Date: 2005-06-20 16:15:10
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
I have a an application that uses a lot of stored functions, some of them 
which create temporary tables and refcursors that point to the tables. 
Something that comes up occasionally are errors like 

the jdbc code looks like 
Connection con = poolingDataSource.getConnection();
CallableStatement proc = con.prepareCall("{ ? = call \"insAccount\" ( ? ) 

proc.registerOutParameter(1, Types.OTHER);
logger.debug("registerCallableStatementForCancel(): exit"+userName);
/* another thread will call statement.cancel() if timeout exceeded*/
logger.debug("unregisterCallableStatementForCancel(): exit"+userName);
ResultSet rset = (ResultSet)proc.getObject(1);

Occasionally the prepareCall just hangs, as logging statements show that it 
does not enter the execute(). The called procedures may or may not user 
temporary tables. But the functions hang just the same. 
Is there anyway i can avoid the hang condition or the next best thing some 
king of time out mechanism. I have one setup in the event that execute 
hangs. But i cannot think of how to cancel a prepareCall().

The application has a commons-dbcp maintaining a connection pool to the 
database server. The jdbc driver used is the jdbc3. The database version is 
7.4.5. It has been deployed on a Debian Linux system with kernel version 

Akhil Srinivasan


pgsql-jdbc by date

Next:From: David GagnonDate: 2005-06-20 21:23:59
Subject: Re: Problems with temporary tables created in callable functions
Previous:From: Akhil SrinivasanDate: 2005-06-20 16:05:06
Subject: Re: Problems with temporary tables created in callable functions

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