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.
>> > Regards,
>> > Ronaldo.
>> > --
>> > []'s,
>> > Ronaldo Rigoni
>> > SCJA
>> > Desenvolvedor J2EE
>> > Ministério da Educação -  CESPE
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Struts-Factory-tp20198219p20200806.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> []'s,
> Ronaldo Rigoni
> SCJA
> Desenvolvedor J2EE
> Ministério da Educação -  CESPE
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-Factory-tp20198219p20206359.html
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to