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
|