Re: java app hangs in sybase JDBC driver calling isClosed



On Jan 31, 4:59 am, ap...@xxxxxxxxxxxxxxxxxx wrote:
On 31 Jan, 12:46, ap...@xxxxxxxxxxxxxxxxxx wrote:

Our java program hang in the sybase JDBC driver when it calls
isClosed.

I have just found out something that might be relevant. isClosed is
called from our connection pool mgr. I just saw this note (below) on
the web sitehttp://java.sys-con.com/read/111252_2.htm:-

Large-scale deployments often face another problem when a pool is
populated with a large number of connections. How does the pool
manager detect when a connection has become invalid? Today, there's no
facility inside a JDBC driver to check and see if a connection is
still valid. The Connection.isClosed() method is sometimes mistakenly
thought to do this, but the intent of isClosed() is to check and see
if a connection is open or closed, not whether the connection is still
usable.

Looks like our connection mgr has fallen into this pit. It is using
jconn3 which I suppose will be too old to use the new isValid method
that the web page talks about. I wonder if this is related to the
problems we are seeing. The env is very unstable and sybase
connections are being lost frequently.

Regards,

Andrew Marlow

I think there's a connection option to change the functionality
of the isClosed() call. The Sybase driver is too ambitious by half
in this call. By spec, the call is supposed to be almost useless.
The space says that all it's supposed to do is to tell you whether
you have already called Connection.close() yet or not. It is *not*
supposed to do anything or check anything at the DBMS, but
that's what Sybase's driver is doing.
IsValid() would be doing the same thing, and there is no way to
really verify whether a connection is still good, except to run a
short query like "select 1" which is likely what the sybase driver is
doing under the covers anyway. And whatever has gone wrong,
anything the driver is sending to the DBMS is being ignored.
Do you have a firewall between you and the DBMS? It looks
like the connection had been left idle long enough to be
cut off.
Joe Weinstein at BEA Systems
.



Relevant Pages

  • [bug] stuck localhost TCP connections, v2.6.26-rc3+
    ... That connection has been stuck for 9 ... and it occured on two boxes, both are SMP ... # Bus options ... # Generic Driver Options ...
    (Linux-Kernel)
  • Re: HP JetDirect (now media center and HP 3310)
    ... The problem I am having is not with a HP printer driver. ... In this situation the drive is accessible through Windows Explorer. ... Windows Explorer to force a connection and get Transfer Images to work. ... I am not sure if this will completely work since the setup program may do ...
    (microsoft.public.windowsxp.print_fax)
  • Re: HP JetDirect (now media center and HP 3310)
    ... The problem I am having is not with a HP printer driver. ... In this situation the drive is accessible through Windows Explorer. ... Windows Explorer to force a connection and get Transfer Images to work. ... I am not sure if this will completely work since the setup program may do ...
    (microsoft.public.windowsxp.print_fax)
  • Re: Driver AutoCommit issue
    ... Isn't the XA driver for the distributed transaction, ... the connection pool was getting created. ... When in the code do you do a commit? ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: TCP/IP over USB
    ... So I think that your best chance is getting the RNDIS driver to work ... sort of a device it is and the PC loads a corresponding driver for it. ... The Advanced option is set via the ActiveSync ... Use the ActiveSync connection ...
    (microsoft.public.windowsce.embedded.vc)