I know it sounds strange, but when two different clients call one server 
resource in my project, the value of request attributes will conflict. 
My server resources are defined like this:

<bean id="router" class="org.restlet.ext.spring.SpringRouter">
 <property name="attachments">
  <map>
   <entry key="/offices/{officeId}/reports/reporting-production"> 
    <bean class="org.restlet.ext.spring.SpringFinder">
     <lookup-method name="create" bean="ReportingProductionServerResource" />
    </bean>
   </entry>
  </map>
 </property>
</bean>

and I'm reading the value of officeId in my server resource's post method like 
this:
String officeIdStr  = (String)getRequest().getAttributes().get("officeId");

But when two different clients call the rest concurrently, the value of 
officeId for one of them is not correct!!! For example if one of the clients 
call the method with officeId=1 and the other one calls the same method with 
officeId=2, both of them will read 1 or both will read 2 using the request 
attributes.I figured it out this problem by adding lots of logs to my code. 

Does anybody have any idea what's going on and any solution? I really 
appreciate it.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2909511

Reply via email to