I'm not sure what you mean.  Even though I advised against it, I
explained how to do it.

To be specific, you write an interceptor that scans the incoming
action instance for @EJB annotations.  For each annotation, you check
the HttpSession to see if you already have a reference for the
specified class.  If not, you do the JNDI lookup and store it in the
HttpSession for future use.  And finally, you inject the reference(s)
into the action and call the next step in the invocation chain.

Maybe someone else has some improvements, but that's the general way
it would work.

On Sat, Aug 30, 2008 at 4:31 PM, Alexander Baetz
<[EMAIL PROTECTED]> wrote:
> As i mentioned, i want to avoid doing the lookup every time. Thats why i
> wanted to write that interceptor.
> But there doesnt seem to be a good way to get Beans without doing the lookup
> directly in the action. At least i didnt find one.
>
> Greetings,
> Alexander

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to