If you use the Spring plugin, you should be able to have your actions and your
interceptors created by Spring.
Then you can simply configure Spring to create your interceptor already wired
up with a SessionFactory.
-Original Message-
From: Célio Cidral Junior [mailto:[EMAIL PROTECTED]
2007/5/23, Guillaume Carré <[EMAIL PROTECTED]>:
if your SessionFactory is injected in your action, and all your
actions extend "AbstractAction" for example, that has a
getSessionFactory() method, you can do this:
public String intercept(ActionInvocation invocation) throws Exception {
Action
2007/5/23, Célio Cidral Junior <[EMAIL PROTECTED]>:
Hi,
I want to implement an OpenInView pattern interceptor involving
Hibernate, but there's a problem. My SessionFactory is both created
and managed by Spring, and my interceptor should have access to that
SessionFactory, however I don't know ho
Not the most elegant solution, but you can pull the ApplicationContext
from the ServletContext:
ServletContext sc = ServletActionContext.getServletContext();
(ApplicationContext)sc.getAttribute("org.springframework.web.context.WebApplicationContext.ROOT");
Josh
On 5/23/07, Célio Cidral Junior <
4 matches
Mail list logo