You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Met @ Uber" <me...@uberstats.com> on 2003/07/02 02:04:40 UTC
MySQL Problems
Within my action I have a service which connects to a database and
returns a Collection of objects. The test code runs perfectly, and
continuously. But when it's run through the servlet it stops working
after a few minutes. The connection to the database just stops. But I
can still use the mysql client to connect so the database doesn't
freeze.
Any help or suggestions would be greatly appreciated.
~ Matthew
--
Met @ Uber <me...@uberstats.com>
Uberstats
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: MySQL Problems
Posted by Rahul <ra...@excibir.co.nz>.
Do you have any piece of code ?
----- Original Message -----
From: "Met @ Uber" <me...@uberstats.com>
To: "Struts Users" <st...@jakarta.apache.org>
Sent: Wednesday, July 02, 2003 12:04 PM
Subject: MySQL Problems
> Within my action I have a service which connects to a database and
> returns a Collection of objects. The test code runs perfectly, and
> continuously. But when it's run through the servlet it stops working
> after a few minutes. The connection to the database just stops. But I
> can still use the mysql client to connect so the database doesn't
> freeze.
>
> Any help or suggestions would be greatly appreciated.
>
> ~ Matthew
> --
> Met @ Uber <me...@uberstats.com>
> Uberstats
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: MySQL Problems
Posted by "Met @ Uber" <me...@uberstats.com>.
I was putting the MySQL connection info directly into my service class.
So how would I go about grabbing that <data-source> information? And
I'm guessing it goes somewhere in my struts-config.xml file?
~ Matthew
On Wed, 2003-07-02 at 12:06, Chip Paul wrote:
> Struts w/ mysql will drop the connection after a while. There's on option
> in the data sources config that will make it auto-reconnect when the
> connection drops. I had to specify this flag in my app or the connection
> would drop after a couple hours and never come back.
>
> <data-source
> autoCommit="false"
> description="MySQL Configuration"
> driverClass="com.mysql.jdbc.Driver"
> maxCount="4"
> minCount="2"
> password="xxxxxxx"
> url="jdbc:mysql://localhost/mydb?autoReconnect=true"
> user="xxxxxxx"
> />
>
> Hope that helps
>
> -Chip
>
> -----Original Message-----
> From: Met @ Uber [mailto:met@uberstats.com]
> Sent: Tuesday, July 01, 2003 7:05 PM
> To: Struts Users
> Subject: MySQL Problems
>
>
> Within my action I have a service which connects to a database and
> returns a Collection of objects. The test code runs perfectly, and
> continuously. But when it's run through the servlet it stops working
> after a few minutes. The connection to the database just stops. But I
> can still use the mysql client to connect so the database doesn't
> freeze.
>
> Any help or suggestions would be greatly appreciated.
>
> ~ Matthew
> --
> Met @ Uber <me...@uberstats.com>
> Uberstats
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
--
Met @ Uber <me...@uberstats.com>
Uberstats
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: MySQL Problems
Posted by Chip Paul <ch...@ethreat.com>.
Struts w/ mysql will drop the connection after a while. There's on option
in the data sources config that will make it auto-reconnect when the
connection drops. I had to specify this flag in my app or the connection
would drop after a couple hours and never come back.
<data-source
autoCommit="false"
description="MySQL Configuration"
driverClass="com.mysql.jdbc.Driver"
maxCount="4"
minCount="2"
password="xxxxxxx"
url="jdbc:mysql://localhost/mydb?autoReconnect=true"
user="xxxxxxx"
/>
Hope that helps
-Chip
-----Original Message-----
From: Met @ Uber [mailto:met@uberstats.com]
Sent: Tuesday, July 01, 2003 7:05 PM
To: Struts Users
Subject: MySQL Problems
Within my action I have a service which connects to a database and
returns a Collection of objects. The test code runs perfectly, and
continuously. But when it's run through the servlet it stops working
after a few minutes. The connection to the database just stops. But I
can still use the mysql client to connect so the database doesn't
freeze.
Any help or suggestions would be greatly appreciated.
~ Matthew
--
Met @ Uber <me...@uberstats.com>
Uberstats
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org