Re: connection pool problem using in Tomcat

grantmitchell7_at_yahoo.com
Date: 09/02/04


Date: 2 Sep 2004 06:57:55 -0700

Joe Weinstein <joeNOSPAM@bea.com> wrote in message news:<4136035E.9000108@bea.com>...
> grantmitchell7@yahoo.com wrote:
>
> > CarbinoS@online.microsoft.com ("Carb Simien [MSFT]") wrote in message news:<zzuzMF7jEHA.2516@cpmsftngxa10.phx.gbl>...
> >
> >>If you are using SelectMethod=direct, then it is possible that you are
> >>seeing an increase in connections due to the creation of cloned
> >>connections. These additional connections are necessary because each
> >>statement requires its own connection. Your Tomcat settings have no
> >>bearing on this particular behavior, as it is inherent in the JDBC driver
> >>itself.
> >>
> >>Are you using transactions in your code? Can you provide code that
> >>reproduces the problem behavior?
> >>
> >>Carb Simien, MCSE MCDBA MCAD
> >>Microsoft Developer Support - Web Data
> >>
> >>Please reply only to the newsgroups.
> >>This posting is provided "AS IS" with no warranties, and confers no rights.
> >>
> >>Are you secure? For information about the Strategic Technology Protection
> >>Program and to order your FREE Security Tool Kit, please visit
> >>http://www.microsoft.com/security.
> >
> >
> > This is a little scary isn't it? If I have a J2EE app that starts out
> > pre-preparing (for subsequent re-use) N prepared statements per
> > connection and I have M concurrent clients using the app then we'll
> > require N*M physical database connections. Is that correct? That
> > number could be pretty huge for even a mid size app..
>
> Not to mention if you plan to do anything transactionally, or use temp tables,
> which would be limited to one real connection, and not involve all the
> under-the-covers connections involved in one logical connection.
> I am confident that an upcoming version of the free MS driver will
> address this. In the mean time you have the option of using commercial
> drivers, or ensuring you run with selectMethod=cursor. As I recall, the
> original poster actually already showed he was running with selectMethod=cursor...
> Joe Weinstein at BEA
> > Is there any plans to address this in any future driver?

Yes the transactional problem is alarming.. Does the driver transact
all the cloned connections for statement when the original connection
is transacted? Who knows but I suppose a test would be relativly
quick.

In regards to selectMethod=cursor - our tests show that result sets
generated with server side cursors can be up to 8 times more expensive
on the database (and slower) than forward only, 'client side' result
sets (depending on the characteristics of the cursor). So instead of
having N*M connections we might end up with N*M server side cursors.
I'm not sure which is worse..

Therefore I would argue that server cursor based result sets are a
major obstacle to scalability and should be avoided at all costs
(except possibly for singleton processes that need a table snapshot
like a report for example).

I hope you are right that an upcoming release resolves this although I
remain skeptical since my guesss is that changing this behavior would
mean a major structural change in the driver's architecture.

On this newsgroup there has been recent reference by Microsoft to a
"new" JDBC driver for SQL 2005. However when I tried to get more
details on this driver there was no response. Perhaps someone from
Microsoft could comment on the "new" driver, and specifically comment
on whether it resolve this serious issue..

Grant



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)

Loading