I'm having the following problem:
- I'm using Oracle ADF for the view and controller of my app.
- With OpenSessionInViewFilter, I intercept the request and open an Hibernate's Session, and it is closed as soon as the bean's method finishes.
What I need is to keep the Session opened until the page is rendered, because in my JSP y use the lazy attributes of the object i load from the DB.
For example:
When I enter index.jspx the IndexBean#main() is executed:
public class IndexBean{
private DBObject myDBObject;
public String main(){
this.myDBObject = this.myDAO.loadObjectFromDB();
return null;
}
}
in index.jspx I have:
...
<af:inputText value="#{myDBObject.lazyAttribute}" />
...
I'd like that the Hibernate's Session keeps open until the af:inputText is processed.
Is this possible? How?
Thanks in advance