Hi Vic,

 <data-sources>
   <data-source key="contact">
     <set-property property="autoCommit" value="true"/>
     <set-property property="description" value="Mysql Contacts"/>
     <set-property property="driverClass" value="com.mysql.jdbc.Driver"/>
     <set-property property="maxCount" value="5"/>
     <set-property property="minCount" value="2"/>
     <set-property property="password" value="password"/>
     <set-property property="url" value="jdbc:mysql://localhost:3306/db"/>
     <set-property property="user" value="user"/>
   </data-source>
 </data-sources>

above section in struts-config.xml is provided as part of struts to enable
DB connection pooling.

Also it works perfect for few hours.

I forgot to mention my database, it is mysql.

Regards

Ajay Kalidindi

-----Original Message-----
From: Vic Cekvenich [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 04, 2003 3:04 PM
To: [EMAIL PROTECTED]
Subject: OT:Re: connection pooling issue


This is not a Struts question IMO.

here is a FAQ for Wiki:

#1. No one should use connection pool, if you want for some (I can't 
think of a good one myself)  do low level JDBC, you should use data 
source. You can look up the data source via JNDI. Things like (low 
level) RowSet take a data source as argument... don't worry about 
connections, you will mess them up, unless you a double nested finnaly 
block.

#2. If you use Struts... you should also use a DAO, such as iBatis.com.

So use a data source (not connections) via JNDI and... don't use data 
source, use a DAO.


.V

Ajay Kalidindi wrote:
> Hi
> 
> The issue is:
> 
> 1. I restart tomcat, everything works good with tomcat, struts, connection pool ...
>    I monitered the catalina.out log and all looks good connecting/releasing etc.
> 2. After few hours I get the following error :
> 
> java.sql.SQLException: Communication link failure: java.io.IOException, underlying 
> cause: Unexpected end of input stream
> 
> I have already tried changing autocommit to true in struts-config.xml.
> 
> Any suggestions are welcome.
> 
> Env Info :
> 
> Redhat 9, Tomcat 4.1.29, struts 1.1, jdk 1.3 ...
> 
> Regards
> 
> Ajay Kalidindi



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to