we have a case here where we use resteasy 2.3.1.GA in the following way:

-          Rest endpoints are SLSB EJBs with interface marked with @Path 

-          Those beans are registered to resteasy via web.xml

                               ...  (and some more)

-          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.:

public class BaseBean implements Base {

                protected UtilService us;

                protected HttpServletRequest request;

                protected HttpServletResponse response;

                protected UriInfo uriInfo;

                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,

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!
Resteasy-users mailing list

Reply via email to