public void afterService(Request req, Response res) throws Exception {
MappingData mappingData = (MappingData) req.getNote(MAPPING_DATA);
try {
Adapter adapter = (Adapter) req.getNote(MAPPED_ADAPTER);
if (adapter != null) {
adapter.afterService(req, res);
}
super.afterService(req, res);
} finally {
req.setNote(MAPPED_ADAPTER, null);
if (mappingData != null){