Results 1 to 3 of 3

Thread: Unclosed connection when using SessionFactoryUtils

  1. #1
    Join Date
    Sep 2005
    Posts
    7

    Default Unclosed connection when using SessionFactoryUtils

    Using:
    Hibernate 2.1.8, JBoss 4.0.2 and Spring 1.2.4

    I have a SLSB that has transaction attribute Required. This SLSB makes a call to another SLSB that has transaction attribute NotSupported. I use SessionFactoryUtils to grab a Hibernate Session inside the second SLSB. A session is opened and used for reading only, but on exit from the method JBoss logs that it has closed a connection:

    2005-09-20 09:22:33,589 INFO [http-0.0.0.0-8080-2][org.jboss.resource.connectionmanager.CachedConnect ionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@ e0286d
    java.lang.Exception: STACKTRACE

    Later on in the log I get

    2005-09-20 09:22:35,574 WARN [Finalizer][net.sf.hibernate.impl.SessionImpl] finalizing unclosed session with closed connection

    It does not seem like the session gets properly closed. BTW donīt use any Spring transaction manager. Is this a bug or is it a configuration issue?

  2. #2
    Join Date
    Sep 2005
    Posts
    7

    Default

    Guess I have to use HibernateTemplate or HibernateInterceptor to get that session closed properly... Am I right? :oops:

  3. #3
    Join Date
    Aug 2004
    Posts
    2,715

    Default

    Indeed

Similar Threads

  1. Connection closed after transaction commit
    By alirussi in forum Data
    Replies: 4
    Last Post: Dec 17th, 2011, 06:41 AM
  2. Replies: 0
    Last Post: Apr 6th, 2005, 08:24 AM
  3. Unclosed Hibernate Connection
    By jvargas in forum Data
    Replies: 4
    Last Post: Mar 28th, 2005, 01:24 PM
  4. Replies: 1
    Last Post: Feb 10th, 2005, 09:57 AM
  5. Replies: 3
    Last Post: Nov 5th, 2004, 08:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •