struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Hunter" <ihun...@hunterweb.net>
Subject Re: Can I avoid bouncing app when database goes down? (struts 1.0 .2) (try poolman) (use validationQuery)
Date Wed, 30 Oct 2002 20:05:00 GMT
Where did you find 2.1?  2.0.3 is current according to
http://www.codestudio.com/index.shtml

----- Original Message -----
From: "Zeltser, Mark" <Mark.Zeltser@lehman.com>
To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
Sent: Wednesday, October 30, 2002 2:48 PM
Subject: RE: Can I avoid bouncing app when database goes down? (struts 1.0
.2) (try poolman) (use validationQuery)


> I am using poolman 2.1 with Sybase jconnect driver and don't have this
> problem.
>
> Mark.
>
> -----Original Message-----
> From: Ian Hunter [mailto:ihunter@hunterweb.net]
> Sent: Wednesday, October 30, 2002 2:42 PM
> To: Struts Users Mailing List
> Subject: Re: Can I avoid bouncing app when database goes down? (struts
> 1.0 .2) (try poolman) (use validationQuery)
>
>
> The socket connection from the servlet container to the database itself is
> always open.  The application itself closes each connection at the end of
> each "page."  I have been implementing connection pooling from the
> beginning, and all that was fine -- the only problem was when the database
> itself went down; the connection pool I was using (struts 1.0.2 default
one)
> wasn't able to recover.  Poolman is once I configured a validationQuery.
> I've tested by logging in, using the app, killing the database, bringing
it
> back up, and resuming in the app.  I get one error and then the
application
> recovers nicely now.
>
> ----- Original Message -----
> From: "Dan Tran" <danttran@hotmail.com>
> To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> Sent: Wednesday, October 30, 2002 2:31 PM
> Subject: Re: Can I avoid bouncing app when database goes down? (struts 1.0
> .2) (try poolman) (use validationQuery)
>
>
> > Question:
> >
> >     Do you keep your connection all the time?  If you
> >     do, it is not adviced to do so.  Close it when ever
> >      you can.
> >
> >      Do you use connection pooling?
> >
> > -D
> > ----- Original Message -----
> > From: "Ian Hunter" <ihunter@hunterweb.net>
> > To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> > Sent: Wednesday, October 30, 2002 10:56 AM
> > Subject: Re: Can I avoid bouncing app when database goes down? (struts
1.0
> > .2) (try poolman) (use validationQuery)
> >
> >
> > > OK, I implemented that throughout my app and it worked so long as I
kept
> > the
> > > database up, but if I logged into my app, dropped the database and
> brought
> > > it back up, I would get this:
> > >
> > > java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
> > JDBC]Connection
> > > reset by peer: socket write error
> > >  at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown
> Source)
> > >  at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
> > >  at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
> > >  at
com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.submitRequest(Unknown
> > > Source)
> > >  at
com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest.openCursor(Unknown
> > > Source)
> > >  at
com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown
> > > Source)
> > >  at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown
Source)
> > >  at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown
> > > Source)
> > >  at com.microsoft.jdbc.base.BaseStatement.executeQuery(Unknown Source)
> > >  at
> > >
> >
>
com.codestudio.sql.PoolManStatement.executeQuery(PoolManStatement.java:105)
> > >
> > > So I implemented a "validationQuery" (I used "select 0") to ensure
that
> > > connections were up.  I imagine this will slow things down a hair, but
I
> > > think I have a workable solution.
> > >
> > > Comments?
> > >
> > > ----- Original Message -----
> > > From: "Zeltser, Mark" <Mark.Zeltser@lehman.com>
> > > To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
> > > Sent: Wednesday, October 30, 2002 11:26 AM
> > > Subject: RE: Can I avoid bouncing app when database goes down? (struts
> 1.0
> > > .2) (try poolman)
> > >
> > >
> > > > Ian,
> > > >
> > > > You will need to configure poolman.xml and put it in your
> > > > app/WEB-INF/classes directory.
> > > >
> > > > Then you can do the following:
> > > >
> > > > DataSource dataSource =  PoolMan.findDataSource(
> > > Constants.DATASOURCE_KEY );
> > > > Connection connection =  dataSource.getConnection();
> > > >
> > > > Take a look at docs included with Poolman for configuration options.
> > > >
> > > > Mark.
> > > >
> > > > -----Original Message-----
> > > > From: Ian Hunter [mailto:ihunter@hunterweb.net]
> > > > Sent: Wednesday, October 30, 2002 11:18 AM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: Can I avoid bouncing app when database goes down?
(struts
> > > > 1.0 .2) (try poolman)
> > > >
> > > >
> > > > http://www.codestudio.com/index.shtml allowed me to download it.
> That's
> > > so
> > > > weird.
> > > >
> > > > Anyway, is there any way to implement this just by specifying the
> class
> > in
> > > > struts-config.xml, so I wind up with code like this?
> > > >
> > > >             ds = (PoolmanConnection)
> > > > servlet.getServletContext().getAttribute(Constants.DATABASE_KEY);
> > > >             conn = ds.getConnection();
> > > >
> > > > Or do I have to jump through all kinds of hoops?
> > > >
> > > > ----- Original Message -----
> > > > From: "Ian Hunter" <ihunter@hunterweb.net>
> > > > To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> > > > Sent: Wednesday, October 30, 2002 11:04 AM
> > > > Subject: Re: Can I avoid bouncing app when database goes down?
(struts
> > 1.0
> > > > .2) (try poolman)
> > > >
> > > >
> > > > > http://www.codestudio.com says it is no longer supported.  I'll
keep
> > > > > looking, but if you have any suggestions...
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Zeltser, Mark" <Mark.Zeltser@lehman.com>
> > > > > To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
> > > > > Sent: Wednesday, October 30, 2002 9:49 AM
> > > > > Subject: RE: Can I avoid bouncing app when database goes down?
> (struts
> > > 1.0
> > > > > .2)
> > > > >
> > > > >
> > > > > > I had the same problem. Try using poolman (I had to patch it
since
> > it
> > > > was
> > > > > > running in endless loop whenever sybase server was rebooted)
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Ian Hunter [mailto:ihunter@hunterweb.net]
> > > > > > Sent: Wednesday, October 30, 2002 8:39 AM
> > > > > > To: Struts Users Mailing List
> > > > > > Subject: Re: Can I avoid bouncing app when database goes down?
> > (struts
> > > > > > 1.0.2)
> > > > > >
> > > > > >
> > > > > > 1.0.2; kinda old, I guess...
> > > > > >
> > > > > > ----- Original Message -----
> > > > > > From: "James Mitchell" <jmitchtx@telocity.com>
> > > > > > To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> > > > > > Sent: Wednesday, October 30, 2002 12:14 AM
> > > > > > Subject: RE: Can I avoid bouncing app when database goes down?
> > > > > >
> > > > > >
> > > > > > > What version of Struts are you using?
> > > > > > >
> > > > > > > There were some changes made in DBCP a few weeks ago that
might
> > help
> > > > > with
> > > > > > > that, but I could be wrong.
> > > > > > >
> > > > > > > James Mitchell
> > > > > > > Software Engineer/Struts Evangelist
> > > > > > > http://www.open-tools.org
> > > > > > >
> > > > > > > "Only two things are infinite, the universe and human
stupidity,
> > and
> > > > I'm
> > > > > > not
> > > > > > > sure about the former."
> > > > > > > - Albert Einstein (1879-1955)
> > > > > > >
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Ian Hunter [mailto:ihunter@hunterweb.net]
> > > > > > > > Sent: Tuesday, October 29, 2002 11:29 PM
> > > > > > > > To: struts-user@jakarta.apache.org
> > > > > > > > Subject: Can I avoid bouncing app when database goes
down?
> > > > > > > >
> > > > > > > >
> > > > > > > > I have struts app that works great until MSDE (MS
SQL
Server)
> > > drops
> > > > a
> > > > > > > > connection, then I have to reset the whole app.  I'm
> connecting
> > to
> > > a
> > > > > > > > datasource defined in struts-config.xml and using
the ms sql
> > > native
> > > > > jdbc
> > > > > > > > drivers.
> > > > > > > >
> > > > > > > > Any ideas?
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:struts-user-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <mailto:struts-user-help@jakarta.apache.org>
> > >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
>
>
> --------------------------------------------------------------------------
----
> This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message