Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-793

UriInfo injected in a field in a Stateless SB contains stale query parameters

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 2.3.4.Final
    • None
    • None
    • None

      When injecting an UriInfo reference into a field in a Stateless Session Bean, the getQueryParameters() methods always returns the parameters for the first request.

      For example the following code:

      @Path("/resource")
      @Stateless
      public class MyResource {
        @Context
        private UriInfo uriInfo;
      
        @GET
        public String get() {
          return ""+uriInfo.getQueryParameters().get("param");
        }
      }
      

      /resource?param=8 returns [8], after that, /resource?param=42 also returns [8].

            patriot1burke@gmail.com Bill Burke (Inactive)
            papegaaij Emond Papegaaij
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: