tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Urban" <sur...@pevo.de>
Subject Re: similar Problems with JDBC : connection lost after several ac cess
Date Thu, 31 Aug 2000 11:05:54 GMT
Hi,

Well,  look at getFetchSize() from ResultSet. It should be the right one.
But becareful! It exists since Version 1.2.

-Stefan

----- Original Message -----
From: Victor Chinnappan <cvdoss@yahoo.com>
To: <tomcat-user@jakarta.apache.org>
Sent: Wednesday, August 30, 2000 5:29 PM
Subject: RE: similar Problems with JDBC : connection lost after several ac
cess


> Hi Y,
> I thought about it and did a manual commit and tried a
> few test cases.... it still sprung up. So now, i have
> a little bit of hacky trick. (Atleast untill i figure
> out the correct one...). After i do an insert and a
> commit, i was looking for a refresh method (ResultSet
> class in JAVA). As i did not find one, i wrote my own.
> A simple "select ....." query at the same instant. For
> the same number of tests that failed earlier, it works
> now... so as long as it works, it should be fine for
> this version...
>
> BTW, is there a direct method to find the number of
> records in a ResultSet object from JAVA. Like the DAO,
> ADO, MFC wrapper "RecordCount()" methods...
>
> Thanks and have a good one,
> VC
>
> --- "Morahg, Yoav" <ymorahg@gist.com> wrote:
> > Just a thought... is your DBConnectionBroker set up
> > to use autocommit or do
> > you need to commit changes manually. If the second
> > is the case, you might
> > not see a new record in the database unless you
> > committed it when you
> > created it.
> >
> > -Y
> >
> > ---------------------------
> > Yoav Morahg
> > Software Engineer
> > Gist Communications
> > (212) 965-1999 xt 122
> > ymorahg@gist.com
> >
> >
> > -----Original Message-----
> > From: Victor Chinnappan [mailto:cvdoss@yahoo.com]
> > Sent: Wednesday, August 30, 2000 9:36 AM
> > To: tomcat-user@jakarta.apache.org
> > Subject: Re: similar Problems with JDBC : connection
> > lost after several
> > access
> >
> >
> > Hi,
> > I came across a dbconnectionbroker class that does
> > the
> > connection pooling et al. this is available at
> > www.javaexchange.com and is free. I also read that
> > there is one at Apache, which is called turbine.
> > Turbine is actually an assorted collection of App
> > Server utilities. I have been using
> > DBConnectionBroker. Most others say it is really
> > good,
> > albeit i have a strange problem for now. But, again
> > i
> > am trying to trace it to my code.
> >
> > The problem i am facing is that of not being able to
> > find a record that was just then created in a table.
> > When a user logs into our system, a sessionID is
> > created and further communication from the client
> > should be based on this session id. So when i try to
> > validate the session id just then created, it
> > returns
> > false for simple query. Not sure why....
> > anyway, a lot of others are using this without any
> > problems... so should be fine...
> >
> > Cheers!!!!
> > Victor.C
> >
> > --- David Cao <dcao@e-travel.com> wrote:
> > > Hi Stefan,
> > >
> > > I have a very similar problem, I wrote my own
> > > connection pool, after several
> > > success access to the database, the connection
> > lost
> > > ! the error message
> > > says, con't find suitable driver. and once I
> > restart
> > > the tomcat, it work
> > > fine !
> > >
> > > I am thinking it's a bug on my code, but now I am
> > > thinking is this a seting
> > > problem in tomact or JDBC? I will looking at this
> > > problem soon, pls keep let
> > > me know if you got any progress, I will also let
> > you
> > > know if i got further
> > > information.
> > >
> > > Thanks.
> > > david
> > >
> > > -----Original Message-----
> > > From: Stefan Urban [mailto:surban@pevo.de]
> > > Sent: Tuesday, August 29, 2000 6:14 AM
> > > To: tomcat-user@jakarta.apache.org
> > > Subject: Problems with JDBC
> > >
> > >
> > > Hi,
> > >
> > > I wrote a Servlet, which connects to a
> > > MySQL-Database. When I'm starting
> > > Tomcat
> > > it all works fine. But several Time later, the
> > > Servlet can't established the
> > > Database-
> > > connection again. I set the Classpath right,
> > because
> > > when I'm stopping
> > > Tomcat, he shows me the rigth Classpath. When I'm
> > > starting Tomcat again, it
> > > all works fine again!!
> > >
> > > Why the hell it does not work several time later?
> > > Where should I set the
> > > Classpath?
> > >
> > > Thanx.
> > >
> > > -Stefan
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Mail - Free email you can access from
> > anywhere!
> > http://mail.yahoo.com/
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Mail - Free email you can access from anywhere!
> http://mail.yahoo.com/


Mime
View raw message