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 <[email protected]>
To: [email protected]
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



      

Reply via email to