0 Replies Latest reply on Aug 7, 2007 12:52 AM by Theresa Field

    Changing datasource configuration causes Hibernate errors

    Theresa Field Newbie

      Hi,

      I am using Hibernate in a servlet and I have configured the hibernate.cfg.xml to use a Oracle datasource. If I change this datasource (up max connections, change the idle timeout), any subsequent calls to the servlet will have the following error...

      javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.

      I believe this has something to do with Hibernate caching the connection and using a connection that has been closed. I assume that JBoss reallocates the connections and Hibernate has a dead reference to the old pool. Perhaps this isn't really a JBoss issue but since this is all theory at this point, I thought I would ask...

      Thanks!

      Theresa