The problem is, that you have an open session in the doView()-Method of the
GenericPortlet. However, The strange thing is that the session is open as well
in the jsp as my latest investigations have shown.
These are the last lines of the doView-Method:
| rResponse.setContentType(text/html);
If you access an hibernate object outside the scope of the hibernate session
where it has been loaded or saved, then before accessing a lazy property you
have to open a new session and reattach the object to the new session. Check
the hibernate session interface to do that - I believe it's
Hi PMN, thanks for your suggestions, but I dont think that this would be the
best way to handle it for several reasons:
* Writing Java Code in a JSP is not recommended
* Opening a new session and reattaching the objects in the JSP violates the
MVC-pattern.
* Performance will suffer a lot
I am not an expert of JSP 186 but I would rather commit the transaction in
processAction to let changes seen by other portlets that may use another
session.
An alternative to share an object outside the current session, why don't you
reload it in the doView() ? Using a second level cache has