This should be fine for performance, unless your site has an
extremely high load.
You can use a servlet filter to do this.
Cheers,
Paul
On Sep 19, 2005, at 7:43 AM, Michal Hlavac wrote:
Hello,
I am using tapestry 4. I created UniwebBasePage extends BasePage
there is method:
protected Session session = null;
public Session getSession() {
if (session == null) {
session = getHibernateGlobal().openSession();
System.out.println("zakladam session");
return session;
} else {
return session;
}
}
when I call from other pages, for example
LoginPage extends UniwebBasePage
public void test() {
Session sess = getSession();
Query q = ...
}
everything is ok, but I want to close session after every request.
Two questions:
1. Is this good performace step ( close hibernate session on every
request)??? If no, is there some any solutions?
2. if yes, how can I do that??
thanks, miso
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]