[jboss-user] [JBoss Portal] - Closing DB Session when all rendering ends

JohnnyTheHun do-not-reply at jboss.com
Tue Dec 4 14:27:30 EST 2007


I am using JBoss Portal bundle 2.6.2 with Hibernate3 annotations and lazy fetch params

I start a session manually when I need data via a DAO. 
The problem is if I close the session after getting data but before rendering a portlet, I will not be able to access my objects properties in the JSP, since lazy fetching only fetches them when I access the properties.

And closing session right after rendering a portlet means I need to open the session with every portlet that gets displayed on the page

Isn't there a way to open a session at the start of actions and close it after all rendering has happened?

Thanks, 
John

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4110311#4110311

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4110311



More information about the jboss-user mailing list