I have an Interceptor that intercepts the Hibernate's LazyInitializationException. I
also have Load Time Weaving turned on. This interceptor works well when called from within
the context of the Web Application Servlet. (By well I mean the
LazyInitializationException does get thrown and my Interceptor handles it.)
However, from Servlet to JSP context, my interceptor does not get invoked.
My JSP file has a simple call like this to an detached entity:
<td>${actionBean.user.department.users}</td>
The .users part throws the LazyInitializationException and should have been cough by my
interceptor. The interceptor debug log doesn't run at all so I know the interceptor is
not being called.
Same example with detached entity but in my Servlet that actually works:
| User user = getUserServiceRemote().getUser(getUserId());
| log.debug("Users: " + user.getDepartment().getUsers());
|
In the above, the .getUsers() part throws the LazyInitializationException and does get
cough and handled by my interceptor.
Why does the JSP version not get intercepted?
Only thing I can think of is that the JSP version actually calls the Department.users
attribute directly and not the getter. My pointcut is set on the getters only and not
fields(attributes).
Thanks in advance.
-Al
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231565#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...