Re: [s2] Struts Dependency Injection and EJB3 - support ? or how can i Do it?

2007-04-08 Thread Piero Sartini
I coded this today, just used the field instead of a setter method. Your pseudo code was very helpful, thanks :-) Maybe the following snippet is useful for someone with the same problem. Should I post this on the wiki as well? I am not sure if it is a good solution - but it works for me. Can

[s2] Struts Dependency Injection and EJB3 - support ? or how can i Do it?

2007-01-22 Thread papo
Hello I am trying to find a way of calling efficienlty from Struts Actions - SLSBs EJB3. I have made a question before. - Doing JNDI calls all the time through every action works though its a very primitive way of doing it. -Tried to implement the Service locator pattern though the semantics

Re: [s2] Struts Dependency Injection and EJB3 - support ? or how can i Do it?

2007-01-22 Thread Ian Roughley
Currently there is no EJB3 support in Struts, however I have done this on a couple of projects. I used a custom annotation to mark action setters as ejb3 then a custom interceptor that looks for the annotation, looks up the ejb3 and injects it into the action. Doing it this way is less than

Re: [s2] Struts Dependency Injection and EJB3 - support ? or how can i Do it?

2007-01-22 Thread Stas Ostapenko
Hi ! Ian, can you provide some kind of example source code to play with ? I'm interesting in Struts 2 and EJB 3 interoperability, but I can't figure out how to get started. Thanks ! On 1/22/07, Ian Roughley [EMAIL PROTECTED] wrote: Currently there is no EJB3 support in Struts, however I have

Re: [s2] Struts Dependency Injection and EJB3 - support ? or how can i Do it?

2007-01-22 Thread Paris Apostolopoulos
Hi again. Ian thank you for your reply. If I understood well, please pardon me...if it is wrong the following you said 1) implement your custom ejb3 annotations into struts ok I wonder the @EJB annotations are not going to work (I guess). I had a look @ some glassfish FAQ.. 2)Then

Re: [s2] Struts Dependency Injection and EJB3 - support ? or how can i Do it?

2007-01-22 Thread Joe Germuska
While I have not used it, the Spring Framework provides strategies for defining Spring Beans which are EJB factories (or something like that.) Struts 2 works quite nicely using Spring as the Action Factory, which can take care of resolving all Action dependencies whether or not they are EJBs.

RE: [s2] Struts Dependency Injection and EJB3 - support ? or how can i Do it?

2007-01-22 Thread Wesslan
] [mailto:[EMAIL PROTECTED] On Behalf Of Joe Germuska Sent: den 22 januari 2007 15:47 To: Struts Users Mailing List Subject: Re: [s2] Struts Dependency Injection and EJB3 - support ? or how can i Do it? While I have not used it, the Spring Framework provides strategies for defining Spring Beans which

Re: [s2] Struts Dependency Injection and EJB3 - support ? or how can i Do it?

2007-01-22 Thread Craig McClanahan
On 1/22/07, Paris Apostolopoulos [EMAIL PROTECTED] wrote: [snip] I wonder the @EJB annotations are not going to work (I guess). I had a look @ some glassfish FAQ.. The standard annotations for Java EE 5 resource injection are indeed *not* going to work on a Struts action, because they only

Re: [s2] Struts Dependency Injection and EJB3 - support ? or how can i Do it?

2007-01-22 Thread Ian Roughley
I can't provide the code - it is owned my a client. But here is the pseudo code: class EJB3Interceptor implements Interceptor { public String intercept(ActionInvocation actionInvocation) throws java.lang.Exception { Object action = actionInvocation.getAction(); for all