geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <d...@iq80.com>
Subject Re: @EJB injection for Jetty
Date Sat, 27 Jan 2007 00:18:34 GMT
What did you run? This worked great for me an Prasad.

Anyway, I changed the code to catch Exception instead of just  
NamingExcetpion.

-dain

On Jan 26, 2007, at 9:26 AM, Jarek Gawor wrote:

> Dain,
>
> This hack is causing problems:
>
> java.lang.NullPointerException
>        at  
> org.apache.xbean.naming.context.ContextFlyweight.listBindings(Context
> Flyweight.java:92)
>        at  
> org.apache.xbean.naming.context.ContextFederation.getFederatedBinding
> s(ContextFederation.java:72)
>        at  
> org.apache.xbean.naming.context.AbstractFederatedContext.getBindings(
> AbstractFederatedContext.java:63)
>        at org.apache.xbean.naming.context.AbstractContext.getBinding 
> (AbstractCo
> ntext.java:86)
>        at org.apache.xbean.naming.context.AbstractContext.lookup 
> (AbstractContex
> t.java:128)
>        at org.apache.xbean.naming.context.AbstractContext.lookup 
> (AbstractContex
> t.java:607)
>        at org.apache.xbean.naming.context.AbstractContext.lookup 
> (AbstractContex
> t.java:151)
>        at org.apache.xbean.naming.context.AbstractContext.lookup 
> (AbstractContex
> t.java:593)
>        at javax.naming.InitialContext.lookup(InitialContext.java:351)
>        at  
> org.apache.geronimo.jetty6.InjectionServletHandler.processAnnotations
> (InjectionServletHandler.java:48)
>        at  
> org.apache.geronimo.jetty6.InjectionServletHandler.customizeServlet(I
> njectionServletHandler.java:38)
>
> I think you need setup the component context properly first (see code
> in jetty6.handler.ComponentContextHandler) in order to get the JNDI
> context.
>
> Jarek
>
> On 1/25/07, Dain Sundstrom <dain@iq80.com> wrote:
>> I added a simple hack to get @EJB injection working in Jetty.  It is
>> hack is just a trimmed down version of the Tomcat
>> DefaultAnnotationProcess or which only handles @EJB injection.
>>
>> As with the Tomcat version, this is only in there to demonstrate the
>> @EJB annotation use and is by no means a final solution for
>> annotation processing.
>>
>> -dain
>>


Mime
View raw message