3 Replies Latest reply on Mar 5, 2012 11:38 AM by jaikiran

    Auto Caching veriable in JBoss 7.1 Final

    surajchhetry

      Hi ,

        I am facing strange issue. I have a RESTful server which is stateless also. But, veriable is chached auto so when I made second request I am getting First request variable value. Here is my sample code

       

       

      Dependency

      ===========

      <dependency>

                                    <groupId>org.jboss.resteasy</groupId>

                                    <artifactId>resteasy-jaxrs</artifactId>

                                    <version>2.3.1.GA</version>

                                    <scope>provided</scope>

                          </dependency>

                          <dependency>

                                    <groupId>org.jboss.resteasy</groupId>

                                    <artifactId>resteasy-multipart-provider</artifactId>

                                    <version>2.3.1.GA</version>

                                    <scope>provided</scope>

                          </dependency>

                          <dependency>

                                    <groupId>org.jboss.resteasy</groupId>

                                    <artifactId>resteasy-jaxb-provider</artifactId>

                                    <version>2.3.1.GA</version>

                                    <scope>provided</scope>

                          </dependency>

       

       

      public interface AgentResource{

       

          @POST

          @Produces("text/plain")

          @Consumes("multipart/form-data")

          @Path("/process")

          public Response processRequest(@MultipartForm AgentForm qFrom);

       

      }

       

       

      /And Implementation Goes like this

       

      @Path("/banking")

      @Stateless

      @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)

      public class AgentResourceImpl extends BaseResource implements AgentResource{

       

           @EJB

            private AgentService agentService;

           private Agent agent; //Agent value is chached after first request 

      }