From: Anton v. S. <an...@ap...> - 2002-05-29 07:01:34
|
Would it be OK to make a change to allow Hibernate to optionally autoclose externally provided connections? I guess it could be done with this in RelationalDatabaseSessionFactory: public Session openSession(java.sql.Connection connection, boolean autoClose) { return openSession(connection, autoClose, 0); //prevents this session from adding things to cache } ...which of course would have to be added to the Session interface. The Resin connections I'm using are wrapped, so if Hibernate were to call close() on them, it ought to simply return them to the Resin pool. I haven't yet tried this out - maybe I'll do that tomorrow. In a related and even more minor request, would it be OK to change the dependence on C3P0 to a dynamic one, so that the JAR isn't needed if you're not using it? I got the impression this would only require a change in one location - I don't remember the details now, but again, I can take a stab at this tomorrow. Anton |