Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

statement.cancel() hangs

2 posts in JDBC Connect (product renamed to JConnect) Last posting was on 1997-05-21 16:57:46.0Z
Ellen Carroll Posted on 1997-05-17 20:23:58.0Z
Message-ID: <337E13DE.6454@raba.com>
Date: Sat, 17 May 1997 16:23:58 -0400
From: Ellen Carroll <ellen.carroll@raba.com>
Reply-To: ellen.carroll@raba.com
Organization: RABA Technologies
X-Mailer: Mozilla 3.0Gold (Win95; U)
MIME-Version: 1.0
Subject: statement.cancel() hangs
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 41
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:825
Article PK: 252575

I would like to add a little more to the post that described a cancel()
problem. If I call statement.cancel() at the right time (i.e., the
thread is in the statement.execute() method, I am guessing) my
application hangs. If I do a "<ctrl>\" the following thread dump is
produced:
.
.
.
"AWT-EventQueue-0" (TID:0xee308160, sys_thread_t:0xef171de0, state:CW)
prio=5
java.net.SocketInputStream.read(SocketInputStream.java:92)
com.sybase.utils.CacheableInputStream.read(CacheableInputStream.java)
com.sybase.tds.PduInputFormatter.F(UnknownSource)
com.sybase.tds.PduInputFormatter.read(UnknownSource)
java.io.DataInputStream.readUnsignedByte(DataInputStream.java)
com.sybase.tds.Tds.nextResult(Unknown Source)
com.sybase.tds.Tds.cancel(Unknown Source)
com.sybase.jdbc.SybStatement.doCancel(SybStatement.java)
com.sybase.jdbc.SybStatement.checkStatement(SybStatement.java)
com.sybase.jdbc.SybStatement.cancel(SybStatement.java)
com.sybase.jdbc.SybCallableStatement.cancel(SybCallableStatement.java)
SP.myCancel.cancel(SP.java:302)
.
.
.
This thread calls statement.cancel() for a statement (a stored
procedure) that is being executed in another thread.

Is this a problem only for canceling stored procedure statements?
Is cancel() necessary if I want to abort a query, or can I just close
the connection and rest assured that all will get cleaned up properly?

+++++++++++++
% java Version
< disclaimer >
jConnect (TM) for JDBC(TM)/2.1/Trial Version expires Jun 22,
1997/JDK11/Wed Apr 23 11:08:34 1997

+++++++++++++

Thanks,

Ellen Carroll


David Clegg Posted on 1997-05-21 16:57:46.0Z
Message-ID: <3383298A.7FBAB1BD@sybase.com>
Date: Wed, 21 May 1997 09:57:46 -0700
From: David Clegg <davec@sybase.com>
X-Mailer: Mozilla 2.01 (X11; I; Linux 1.2.13 i586)
MIME-Version: 1.0
To: ellen.carroll@raba.com
Subject: Re: statement.cancel() hangs
References: <337E13DE.6454@raba.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 47
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:794
Article PK: 252546

I believe that this cancel problem is fixed in the newest jConnect.
Download it and give it another try.

dave

>
> I would like to add a little more to the post that described a cancel()
> problem. If I call statement.cancel() at the right time (i.e., the
> thread is in the statement.execute() method, I am guessing) my
> application hangs. If I do a "<ctrl>\" the following thread dump is
> produced:
> .
> .
> .
> "AWT-EventQueue-0" (TID:0xee308160, sys_thread_t:0xef171de0, state:CW)
> prio=5
> java.net.SocketInputStream.read(SocketInputStream.java:92)
> com.sybase.utils.CacheableInputStream.read(CacheableInputStream.java)
> com.sybase.tds.PduInputFormatter.F(UnknownSource)
> com.sybase.tds.PduInputFormatter.read(UnknownSource)
> java.io.DataInputStream.readUnsignedByte(DataInputStream.java)
> com.sybase.tds.Tds.nextResult(Unknown Source)
> com.sybase.tds.Tds.cancel(Unknown Source)
> com.sybase.jdbc.SybStatement.doCancel(SybStatement.java)
> com.sybase.jdbc.SybStatement.checkStatement(SybStatement.java)
> com.sybase.jdbc.SybStatement.cancel(SybStatement.java)
> com.sybase.jdbc.SybCallableStatement.cancel(SybCallableStatement.java)
> SP.myCancel.cancel(SP.java:302)
> .
> .
> .
> This thread calls statement.cancel() for a statement (a stored
> procedure) that is being executed in another thread.
>
> Is this a problem only for canceling stored procedure statements?
> Is cancel() necessary if I want to abort a query, or can I just close
> the connection and rest assured that all will get cleaned up properly?
>
> +++++++++++++
> % java Version
> < disclaimer >
> jConnect (TM) for JDBC(TM)/2.1/Trial Version expires Jun 22,
> 1997/JDK11/Wed Apr 23 11:08:34 1997
>
> +++++++++++++
>
> Thanks,
>
> Ellen Carroll