Are your EJBs within the web-inf/classes or web-inf/lib? If so, don't use resteasy.jndi.resources and let the app server scan for jax-rs services.
With resteasy.jndi.resources, field injection does not work as Resteasy builds up metadata knowledge by scanning the class of the object returned by a JNDI lookup. On 3/7/12 7:36 AM, for...@paaro.com wrote: > It seems that the problem might be in the way we inject @Context data. > If class-level injected, the problem appears (as Aleš pointed out), but > when injected on the method level (via method parameter), everything > seems to be ok. > > Peter > > 2012/3/6 Aleš Bregar <ales.bre...@beesmart.tv > <mailto:ales.bre...@beesmart.tv>> > > Hi,____ > > __ __ > > we have a case here where we use resteasy 2.3.1.GA <http://2.3.1.GA> > in the following way:____ > > __-__Rest endpoints are SLSB EJBs with interface marked with @Path > annotations____ > > __-__Those beans are registered to resteasy via web.xml____ > > __ __ > > <context-param>____ > > <param-name>resteasy.jndi.resources</param-name>____ > > <param-value>____ > > global/msdp/api-ejb/BaseBean,____ > > global/msdp/api-ejb/AccessBean,____ > > … (and some more)____ > > </param-value>____ > > </context-param>____ > > __ __ > > __-__we have created some custom ouath mechanism and filter which > validate the message and add attributes to the request____ > > __-__and when it comes to Bean eq.:____ > > __ __ > > @Stateless____ > > public class BaseBean implements Base {____ > > ____ > > @EJB____ > > protected UtilService us;____ > > __ __ > > @Context____ > > protected HttpServletRequest request;____ > > __ __ > > @Context____ > > protected HttpServletResponse response;____ > > __ __ > > @Context____ > > protected UriInfo uriInfo;____ > > __ __ > > @Inject____ > > private UserLinkRepository userLinkRepository;____ > > ____ > > ...____ > > __ __ > > Seems that everything is injected correctly and all seemed to work > quite fine.____ > > __ __ > > __ __ > > But with some testing I see some strange behaviour which IMO is most > probably around @Context injection. Sometimes it happen that > HttpServletRequest object in the filter is not the same as one > injected to bean (debugged by object hash code) and/or also > attributes set to the request in the filter are not proper when read > in the bean or even not set(are null?). Sometimes when this race > condition happens it helps if I wait some random time (for container > to cleanup something? I gess) and next request is successful again.____ > > __ __ > > __ __ > > I would ask for some hint or maybe a point where to start looking > at.____ > > __ __ > > Thank you in advance and brg,____ > > Aleš____ > > __ __ > > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > Resteasy-users mailing list > Resteasy-users@lists.sourceforge.net > <mailto:Resteasy-users@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/resteasy-users > > > > > ------------------------------------------------------------------------------ > Virtualization& Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > > > > _______________________________________________ > Resteasy-users mailing list > Resteasy-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/resteasy-users -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users