if you ever had problems like when you have an app that is idle over night and mysql disconnects you, or you restart mysql... then typestry page will fail because hibernate will hold on to the broken connection...
here's an config that uses a pool that can reconnect and discard broken connections <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class"> org.gjt.mm.mysql.Driver</property> <property name="hibernate.connection.url ">jdbc:mysql://localhost/dbname?charset=utf8</property> <property name="hibernate.dialect"> org.hibernate.dialect.MySQLDialect</property> <property name="hibernate.connection.username">user</property> <property name="hibernate.connection.password"></property> <!-- pool via c3p0 which knows how to reconnect to server and does it nicely--> <property name="connection.provider_class"> org.hibernate.connection.C3P0ConnectionProvider</property> <property name="hibernate.c3p0.acquire_increment">1</property> <property name="hibernate.c3p0.idle_test_period">100</property> <!-- seconds --> <property name="hibernate.c3p0.max_size">10</property> <property name="hibernate.c3p0.max_statements">0</property> <property name="hibernate.c3p0.min_size">1</property> <property name="hibernate.c3p0.timeout">100</property> <!-- seconds --> </session-factory> </hibernate-configuration> On 9/10/07, Davor Hrg <[EMAIL PROTECTED]> wrote: > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE hibernate-configuration PUBLIC > "-//Hibernate/Hibernate Configuration DTD 3.0//EN" > " http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd > "> > <hibernate-configuration> > <session-factory> > <property name="hibernate.connection.driver_class"> > org.gjt.mm.mysql.Driver</property> > <property name="hibernate.connection.url > ">jdbc:mysql://localhost/dbname?charset=utf8</property> > <property name="hibernate.dialect "> > org.hibernate.dialect.MySQLDialect</property> > <property name="hibernate.connection.username">user</property> > <property name="hibernate.connection.password "></property> > </session-factory> > </hibernate-configuration> > > On 9/10/07, Angelo Chen < [EMAIL PROTECTED]> wrote: > > > > > > Hi Marcus, > > > > Good point, I removed it. but that error still coming out, must be > > something > > wrong with the xml file, care to share your hibernate.cfg.xml here so I > > can > > build a new one from an already running one. > > > > > > Marcus Schmidke-2 wrote: > > > > > > I cannot really tell what the error is, but I am also a beginner and > > > also started with an existing Hibernate configuration the same way as > > > you did, so it will be only a small mistake. > > > > > > > > > > -- > > View this message in context: > > http://www.nabble.com/T5%3A-Hibernate-tf4409684.html#a12587485 > > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > >