Hello, I have a question concerning hibernate with the portal. For my application I followed http://docs.jboss.org/jbossas/getting_started/v4/html/hibernate.html and deploy the mappings inside a *.har, which is inside an *.ear - no problem.
To get the Session I'm using JBP code from org.jboss.portlet.forums.impl.ForumsModuleImpl#getSession SessionFactory sf = (SessionFactory)new InitialContext().lookup("java:/portal/SessionFactory"); | Session session = sf.getCurrentSession(); | return session; | } | catch (NamingException e) | { | throw new RuntimeException(e); | } For the queries I looked at other methods from ForumsModuleImpl and I saw that the sessions are never closed here. However in the above linked docs they are closed in a finally block. Is this not necessary because the container somewhat takes care about this? Thanks Martin View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3904859#3904859 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3904859 ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user