[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openejb-user
Subject:    Re: EJB Annotation does not work in AbstractServlet
From:       Maxime Thieu <maxime.thieu () gmail ! com>
Date:       2008-12-22 10:50:17
Message-ID: 21125847.post () talk ! nabble ! com
[Download RAW message or body]


Thanks for your response and for opening this Jira.

It will be great to have this feature. Actually, my abstract Servlet have an
abstract method wich return an EJB, and all my other servlets (extending the
abstract servlet) define an EJB just for returning it to the super class ...

Any idea of what version of OpenEJB should have this feature ?

Maxime


David Blevins wrote:
> 
> 
> On Dec 19, 2008, at 1:03 AM, Maxime Thieu wrote:
> 
> > 
> > Hello,
> > 
> > I am using OpenEJB 3.1 in Tomcat.
> > 
> > I use the Annotation @EJB in my Servlet in order to obtain my EJB  
> > and it
> > works well.
> > 
> > But If I use the Annotation @EJB in an abstract Servlet (which is the
> > superclass of all my Servlets), it does'nt work : it seams that the  
> > EJB
> > Annotation is not "interpreted" by openEJB.
> > 
> > Is this normal ? Is there any way for referencing EJB in abstract  
> > Servlet ?
> 
> We could get this to work, but we'd have to replace the annotation  
> processor in Tomcat.  That isn't really a big deal and would be an  
> easy feature to add.  We simply error on the conservative side when it  
> comes to replacing parts of Tomcat in the Tomcat/OpenEJB integration  
> (we want Tomcat to still feel like Tomcat), usually holding off till  
> someone requests a feature that requires it.  This would be one of  
> those features.
> 
> The Tomcat annotation processor is pretty decent in that it looks for  
> the basic annotations then blindly looks up from JNDI and injects what  
> it finds -- this allows us to expand it to support things that Tomcat  
> doesn't normally support.  But there two things it will not do: look  
> for annotations in super classes (as you notice); do xml-only injection.
> 
> Added a jira for it:
> 
> https://issues.apache.org/jira/browse/OPENEJB-979
> 
> -David
> 
> 
> 

-- 
View this message in context: \
http://www.nabble.com/EJB-Annotation-does-not-work-in-AbstractServlet-tp21087942p21125847.html
 Sent from the OpenEJB User mailing list archive at Nabble.com.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic