And you could automate that for all your actions by writing an interceptor for it. (assumption: googlecode EJB plugin doesn't contain one already).

esemba on 28/10/08 12:33, wrote:
DI by default doesn't work, because POJOs (S2 actions) are not
container-managed resources. You may use JNDI look
Annotate EJB @Stateless(mappedName="ejb/MyEJB") and in client(S2 action):
InitialContext c = new InitialContext();
MyEJBInterface o = (MyEJBInterface) c.lookup("ejb/MyEJB");

I have no experience with googlecode ejb plugin.



Ronaldo Rigoni ... wrote:
Yes, I need that the container injected the instance of EJB in
Action automatically. Sorry for my english.
Tanks.
Ronaldo


2008/10/28 esemba <[EMAIL PROTECTED]>

hi,
could u be more specific, what is your issue? what do you mean by struts
factory? you want to inject EJB into struts 2 action?



Ronaldo Rigoni ... wrote:
Hi all,
Can I create a Struts Factory managed in GlassFish?
Because I have a EJB in my action, and if the bean has created by
container
e EJB injection has automatic.


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

Reply via email to