-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: tomcat5 hib2 dbcp mysql 3.43 .... problems
PostPosted: Sat Apr 10, 2004 11:44 am 
Newbie

Joined: Sat Apr 10, 2004 11:22 am
Posts: 2
Location: paris
hello everybody,

I have 2 problems using this config in multithreading use of a small but commercial web site (not mine):

1) in production, the mysql connections are sometimes loosed by dbcp :
ERROR JDBCExceptionReporter:46 - Communication link failure: java.io.EOFException, underlying cause: null

but I can't figure where it does come from, and of course, it would be too easy, I can't reproduce it in development environment

2) my hibernate / mysql config for int ID is to use :
<id name="id" type="int" unsaved-value="0">
<generator class="increment"/>
</id>
because entity (and native) doesn't work and leads to 0 for PK value


the technical architecture is the following:
I use the thread local hibernate session strategy with a flush and clear at the end of each http request (in httpservlet service method I know I could use servlet filters but not yet....).

whenever an error occurs during a validation (save or update), I close the session (in the DAO layer) so that next getSession() of the DAO layer will create a new session.

my question is: what should I read ? do ?
I know well servlet containers and JDBC.
Is there specific warnings about mysql and DBCP ?

thanks a lot
Phil


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 10, 2004 11:46 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Enable validation for the pool or set autoReconnect=true in your JDBC driver URL.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 10, 2004 11:49 am 
Newbie

Joined: Sat Apr 10, 2004 11:22 am
Posts: 2
Location: paris
autoReconnect=true is already done in my tomcat servlet.xml resource jdbc url description ...

I gonna have a look at the validation for the pool ....

thanks
Phil


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.