Envoyé : mardi 20 janvier 2009 22:10
À : Struts Users Mailing List
Objet : Re: Injecting in Interceptors
2009/1/20 Ignacio de Córdoba :
Anybody has an idea on how can I get info about ServletContext in the init()
method of an interceptor? I'd like to lookup EJBs there and not lookup th
z.len...@googlemail.com]
Envoyé : mardi 20 janvier 2009 22:10
À : Struts Users Mailing List
Objet : Re: Injecting in Interceptors
2009/1/20 Ignacio de Córdoba :
> Anybody has an idea on how can I get info about ServletContext in the init()
> method of an interceptor? I'd like to lookup EJBs there and
Hi,
I saw that plugin but it solves the "application name" subdir to be supplied
in the JNDI lookup with a parameter in the Annotation, which makes it code
dependant. I need to get that data from the ServletContext (application
name) or at least a webapp init parameter.
As I see it, the lazy load
2009/1/20 Ignacio de Córdoba :
> Anybody has an idea on how can I get info about ServletContext in the init()
> method of an interceptor? I'd like to lookup EJBs there and not lookup them
> for every request (I know I can get the info I need from ActionInvocation
> object that every intercept() get
Thanks for your reply Dave,
I'll have to solve it that way... but I wanted to use the init() method and
so avoid the "if()" checking for the EJBS existance...
Without any info about the environment I don't really get how that method is
useful for anything.
Thanks,
Ignacio
newton.dave wrote:
>
Ignacio de Córdoba wrote:
Hi Musachy and thanks for your reply but that static invocation in that class
is not working if called from an interceptor or, at least, from the init()
method of the interceptor.
You don't need to get JNDI resources on every request--use the lazy
initialization "patt
agr, that's true, it won't be available on the init method.
On Tue, Jan 20, 2009 at 3:31 PM, Ignacio de Córdoba wrote:
>
> Hi Musachy and thanks for your reply but that static invocation in that class
> is not working if called from an interceptor or, at least, from the init()
> method of the int
Hi Musachy and thanks for your reply but that static invocation in that class
is not working if called from an interceptor or, at least, from the init()
method of the interceptor.
Probably this is due to the way it gets the ServletContext. Probably it
first gets the request or the session, and us
org.apache.struts2.ServletActionContext.getServletContext() is what you want.
musachy
On Tue, Jan 20, 2009 at 3:03 PM, Ignacio de Córdoba wrote:
>
> Hi there,
> I am developing a Authorization interceptor and need to perform a JNDI
> lookup to get some Stateless EJBs from JBoss.
>
> My problem i
9 matches
Mail list logo