• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts Web Application keeps hanging after 4 transacations with database

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Eclipse/Struts1.1/tomcat5.0/MySql

some of my applications are getting stuck after 4 or 5 inserts into the database, then on the tomcat console it keeps printing...

..org.apache.struts.legacy.GenericDatasource getConnection
INFO: check for timeout, activeCount=10, useCount=10
..org.apache.struts.legacy.GenericDatasource getConnection
INFO: sleep until next test....

this keeps printing on the console...I can't even stop the tomcat..

I know it is not problem with tomcat...because some of other applications
are working fine on same environment....

Any one saw this before...any ideas.....

Thanks in advance
[ August 19, 2004: Message edited by: swetlana chi ]
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Swetlana,
Double check you are closing your connection to the database.
 
Sri chirat
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the input...
I am closing the connection properly I believe....following is my DAO.java

public void addFamily(Familyclient familyclient)
throws DatastoreException, SQLException {
PreparedStatement psfamilyclient = null;
ResultSet rs=null;
try {
if (conn.isClosed()) {
throw new IllegalStateException("error.unexpected");
}
psfamilyclient = conn.prepareStatement(SQL_INSERT_FAMILY);
psfamilyclient.setString(1,familyclient.getHomeName());
......
psfamilyclient.execute();
psfamilyclient.close();
conn.close();
} catch (NumberFormatException nfe) {
nfe.printStackTrace();
} finally {
try {
if (psfamilyclient != null) {
psfamilyclient.close();
conn.close();
}
} catch (SQLException e) {
e.printStackTrace();
throw new RuntimeException("error.unexpected");
}
}
}

****Is this correct?

Thanks
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic