Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.5.3
-
None
Description
I need a transactional layer between the method call newResourceResponse(attributes); and data.getWriteCallback().writeData(attributes); cause the ResourceResponse holds a transactional reference which can not be closed until the data.getWriteCallback().writeData(attributes); was called. At this moment there is no ability to do such transactional handling.
For now I have a workaround with a DelegateResource which calls a sendReseponse method inside the respond method
public void sendResponse(final ResourceResponse resourceResponse) { final AbstractResource resource = new AbstractResource() { @Override protected ResourceResponse newResourceResponse(final Attributes attributes) { return resourceResponse; } }; resource.respond(attributes); }