I have been looking more into the issue and have found some more additional 
issues.

1. As you suggested filters do not work as they are completed before the 
response is sent to the client.
2. The ConnectorService also does not work as the afterSend method is only 
called if there was an entity and there were no IO exceptions in streaming the 
result to the client. The result of this that you will have dangling 
EntityManagers as they are not closed.

What is required is an interceptor/filter which can wrap the entire call to the 
restlet chain which wraps the handle and commit calls. This would allow you to 
do setup before the restlet calls and cleanup after the response has been 
committed. The developer then can include a finally block so that the cleanup 
is also performed after any exceptions.

Paul

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

Reply via email to