Re: prepareCall hangs
От | Oliver Jowett |
---|---|
Тема | Re: prepareCall hangs |
Дата | |
Msg-id | 42B75D2F.50407@opencloud.com обсуждение исходный текст |
Ответ на | prepareCall hangs (Akhil Srinivasan <akhilss@gmail.com>) |
Ответы |
Re: prepareCall hangs
|
Список | pgsql-jdbc |
Akhil Srinivasan wrote: > CallableStatement proc = con.prepareCall("{ ? = call > \"insAccount\" ( ? ) }"); > > proc.registerOutParameter(1, Types.OTHER); > proc.setString(2,userName); > this.registerCallableStatementForCancel(proc); > logger.debug("registerCallableStatementForCancel(): exit"+userName); > /* another thread will call statement.cancel() if timeout exceeded*/ > proc.execute(); > this.unregisterCallableStatementForCancel(proc); > 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(). I find this unlikely as prepareCall doesn't do any I/O or thread-related work. It could be getting stuck in a loop, but it seems odd that it would only happen intermittently. More likely seems to be that you have a problem in registerCallableStatementForCancel. Can you add more logging immediately before calling registerCallableStatementForCancel() to eliminate that possibility? Alternatively, can you get a thread dump (on Linux/Solaris, send a SIGQUIT to the Java process) when it hangs? That'd show us exactly where things have stopped. -O
В списке pgsql-jdbc по дате отправления: