Re: Extending EJBInjection interceptor

2008-08-30 Thread David N. Arnold
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 c

RE: Extending EJBInjection interceptor

2008-08-30 Thread Martin Gainty
200> From: [EMAIL PROTECTED]> To: user@struts.apache.org> Subject: Re: Extending EJBInjection interceptor> > 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 wi

Re: Extending EJBInjection interceptor

2008-08-30 Thread Alexander Baetz
other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > Date: Sat, 30 Aug 2008 16:18:56 +0200> From: [EMAIL PROTECTED]> To: user@struts.apache.org> Subject: Re: Extending EJBInjection interceptor> > Thats a pretty good explana

RE: Extending EJBInjection interceptor

2008-08-30 Thread Martin Gainty
ion to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > Date: Sat, 30 Aug 2008 16:18:56 +0200> From: [EMAIL PROTECTED]> To: user@struts.apache.org> Subject: Re: Extending EJBInjection interceptor> > Tha

Re: Extending EJBInjection interceptor

2008-08-30 Thread Alexander Baetz
Thats a pretty good explanation of how the plugin works I was going to use this method because it was recommended by another user on the mailing list. EJB3 is no necessity, but i want to avoid making jndi lookups in every action i have. Is there another way to achive that? Greetings, Alex

Re: Extending EJBInjection interceptor

2008-08-29 Thread David N. Arnold
On Wed, Aug 27, 2008 at 3:46 AM, Alexander Baetz <[EMAIL PROTECTED]> wrote: > Hi, > > i'm currently working on a new Interceptor for EJB Injection on Actions. I > allready extendet it to work on fields and methods. But since i dont like to > make my own Annotation type i wanted to use the javax.ejb

Re: Extending EJBInjection interceptor

2008-08-28 Thread Alexander Baetz
any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Wed, 27 Aug 2008 19:16:53 +0200 From: [EMAIL PROTECTED] To: user@struts.apache.org Subject: Re: Extending EJBInjection interceptor Correct me if i'm wrong but af

Re: Extending EJBInjection interceptor

2008-08-27 Thread Jeromy Evans
Struts Two wrote: Now seeing that Jeromy is working on a new Interceptor, I wonder if all the servers follow the same lookup pattern. I'm not working on any interceptors related to this. For JNDI lookups in S2 in the past I've used the DI framework's features rather S2. ie. Both Spring and Gu

Re: Extending EJBInjection interceptor

2008-08-27 Thread Alexander Baetz
the "old" way for JBoss servers is a JNDI lookup, which looks something like this: InitialContext initialContext = new InitialContext(); service = initialContext.lookup(""); normaly would be the name used in the @stateless or @statefull annotation or (if not set) the classname As it has be

Re: Extending EJBInjection interceptor

2008-08-27 Thread Struts Two
I am currently using my own customized EJB3InjectInterceptor for Websphere application server (It only injects local beans as I do not use remote in my application). Now seeing that Jeromy is working on a new Interceptor, I wonder if all the servers follow the same lookup pattern. I know that in

RE: Extending EJBInjection interceptor

2008-08-27 Thread Martin Gainty
nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > Date: Wed, 27 Aug 2008 19:16:53 +0200 > From: [EMAIL PROTECTED] > To: user@struts.apache.org > Subject: R

Re: Extending EJBInjection interceptor

2008-08-27 Thread Alexander Baetz
As i answered to the other mail. I'm not sure. Based on the code i started with i thought i would have to take care of the instances (and therefore only hold one for a stateless bean). I'm not that familiar with EJB injection and lookups. but when i think about it JNDI has to hold the one instan

Re: Extending EJBInjection interceptor

2008-08-27 Thread Alexander Baetz
Correct me if i'm wrong but afaik beans (with bean-name) are defined via @stateless and @statefull and @entity @EJB (in servelett context) does the injection for me. and this doesnt work with struts. based on the code from the plugin i thought i would have take care of the instances. but maybe

Re: Extending EJBInjection interceptor

2008-08-27 Thread Lukasz Lenart
> make my own Annotation type i wanted to use the javax.ejb.ejb anotation. But Maybe it will be better to use @Inject from xwork or something? The javax.ejb.ejb annotation are used to define EJBs itself not to be used for injecting them. Regards -- Lukasz http://www.lenart.org.pl/

Re: Extending EJBInjection interceptor

2008-08-27 Thread Jeromy Evans
Alexander Baetz wrote: Hi, i'm currently working on a new Interceptor for EJB Injection on Actions. I allready extendet it to work on fields and methods. But since i dont like to make my own Annotation type i wanted to use the javax.ejb.ejb anotation. But there is a small problem with that: