i'm not sure why it is happening. in my hibernate.cfg.xml, i had set
"hibernate.transaction.auto_close_session" to false. but when i looked at
the debug log, i noticed the following:
11:12:04,322 [DEBUG http-8080-Processor24 org.hibernate.event.def.AbstractFlushingEventListener] executing flush
11:12:04,322 [DEBUG http-8080-Processor24 org.hibernate.event.def.AbstractFlushingEventListener] post flush
11:12:04,323 [DEBUG http-8080-Processor24 org.hibernate.jdbc.JDBCContext] before transaction completion
11:12:04,323 [DEBUG http-8080-Processor24 org.hibernate.impl.SessionImpl] before transaction completion
11:12:04,324 [DEBUG http-8080-Processor24 org.hibernate.transaction.JDBCTransaction] committed JDBC Connection
11:12:04,324 [DEBUG http-8080-Processor24 org.hibernate.jdbc.JDBCContext] after transaction completion
11:12:04,324 [DEBUG http-8080-Processor24 org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
11:12:04,325 [DEBUG http-8080-Processor24 org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
11:12:04,325 [DEBUG http-8080-Processor24 com.mchange.v2.c3p0.stmt.GooGooStatementCache] checkinAll(): com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 10; checked out: 0; num connections: 3; num keys: 10
11:12:04,326 [DEBUG http-8080-Processor24 com.mchange.v2.resourcepool.BasicResourcePool] trace com.mchange.v2.resourcepool.BasicResourcePool@6c5482 [managed: 3, unused: 2, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@89dd)
11:12:04,326 [DEBUG http-8080-Processor24 org.hibernate.impl.SessionImpl] after transaction completion
11:12:04,327 [DEBUG http-8080-Processor24 org.hibernate.impl.SessionImpl] automatically closing session
11:12:04,327 [DEBUG http-8080-Processor24 org.hibernate.impl.SessionImpl] closing session
11:12:04,327 [DEBUG http-8080-Processor24 org.hibernate.jdbc.ConnectionManager] connection already null in cleanup : no action
...
11:12:05,977 [WARN http-8080-Processor24 com.ecredit.ecdata.webapp.HibernateSessionFilter] exception caught while unbinding session
org.hibernate.SessionException: Session is closed!
at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:50)
at org.hibernate.impl.SessionImpl.getTransaction(SessionImpl.java:1297)
at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:274)
at $Proxy0.isOpen(Unknown Source)
at com.ecredit.ecdata.webapp.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:78)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
...
any idea?
thanks,
|