-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Do i need to close session with a servlet filter
PostPosted: Thu May 06, 2004 1:06 pm 
Beginner
Beginner

Joined: Mon Sep 15, 2003 9:10 am
Posts: 43
My action, get a list from a dao object.

When my dao object init my list, it open a session with :

getList(){
try{
...
session = HibernateFilter.getSession();.
...
}catch{
...
}
finally{
HibernateFilter.getSession().close();
}
}

Then the view is called by my action.

The view display my list and the content of each object (without lazy loading : thanks the filter).

First : is it correct ?
Second : Should i close session in my dao object or let it be closed by session filter ?

Thanks,

Fabien.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.