Hello,

I did not get any response on my post from 2 weeks ago.

Even if non-recycling of request/response objects happens only
sporadically and only in webapps where asynchronous responses may happen
before the event processing has finished, it is definitively a bug.

Should I report it as a bug to receive any reaction?

Regards,
Matthias

> -----Original Message-----
> From: Reich, Matthias 
> Sent: Wednesday, May 30, 2007 2:04 PM
> To: 'Tomcat Users List'
> Subject: Comet: Unsufficiently synchronized recycling decisions
> 
> Hi,
> 
> as mentioned in my contribution to topic 'Web application 
> receives request parameters sent to another application on 
> Tomcat 6', I sometimes get non-recycled Request objects in a 
> BEGIN event. 
> 
> A non-recycled request object appeared in a BEGIN event if 
> the previous request processed by the same request processor 
> was answered asynchronously directly after the BEGIN event.
> 
> In such a situation my Servlet sometimes did not get an END 
> event, i.e. the CoyoteAdapter was not triggered again and 
> therefore could not recycle the Request object.
> Nevertheless, the request processor was recycled, i.e. 
> readded to the processor pool.
> 
> As the processor was recycled, the cometEvent.close() must 
> have happened *after* CoyoteAdapter had made the decision not 
> to recycle Request/Response, but *before* Http11AprProtocol 
> had made the decision to recycle the processor.
> 
> To verify this, I modified the methods 
> Http11AprProcessor.event and Http11AprProcessor.process.
> 
> I replaced every occurrence of:
> 
>   recycle();
> 
> within these methods with the following lines:
> 
>   org.apache.catalina.connector.Request req = 
> (org.apache.catalina.connector.Request) request.getNote(1);
>   org.apache.catalina.connector.Response res = 
> (org.apache.catalina.connector.Response) response.getNote(1);
>   req.recycle( );
>   res.recycle( );
>   recycle();
> 
> I know that this is a hack and must be solved in a better way 
> (and also for the NIOConnector), but with these modifications 
> I enforced a single decision point for recycling of 
> Request/Response *and* the processor.
> 
> When running Tomcat with these modifications, my Servlet no 
> longer received non-recycled Request objects.
> 
> 
> Regards,
> Matthias
> 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to