jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From go canal <goca...@yahoo.com>
Subject Re: WARN: Unclosed session detected ....
Date Mon, 20 Jul 2009 14:19:07 GMT
I do not think I am using 'open session in view' ...... 



 in DAO, I have something like this :

        Session session=null;
        try {
            session = jcrSessionFactory.getSession();
            Node parentNode = session.getRootNode();
            jcrom.addNode(parentNode, file);
            session.save();
        } catch (RepositoryException re) {
            logger.debug(re.getStackTrace());
        } finally {
            if (session != null)
                session.logout();
        }

I thought I have closed the session .....

or does spring configuration creates a session :

    <bean id="jcrSessionFactory"
class="org.springmodules.jcr.jackrabbit.JackrabbitSessionFactory"
destroy-method="destroy">
 ....
 </bean>

rgds,
canal




________________________________
From: Thomas Müller <thomas.mueller@day.com>
To: users@jackrabbit.apache.org
Sent: Monday, July 20, 2009 10:11:38 PM
Subject: Re: WARN: Unclosed session detected .....

Hi,

> any idea why i get this warning message ?

Yes, because you have opened the session in your application, but then
forgot to call session.logout(). The session detects this when it is
garbage collected, and writes that warning to the log file. That's
what "Unclosed session detected. The session was opened here:" tries
to say.

Regards,
Thomas



      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message