@Override
public GetResponseDMO get(GetRequestDMO getRequest) {
// All requests are immediately wrapped for use on the server. This includes
// associating the request with the originating HttpServletRequest.
GetRequest request = new GetRequest(getRequest, getThreadLocalRequest());
GetResponse response = null;
// If tracking is enabled dump a trace log
if (request.isTrackingEnabled())
logger.trace("Received by DMP servlet:\n" + request.toOIF());
try {
// Ensure that the session is valid - if it isn't, an error reponse
// will be returned.
response = (GetResponse) securityManager.validateSession(request);
if (response == null){
// All activity takes place against the session
SessionRI session = securityManager.getSession(request);
response = session.handleGetRequest(request);
// response = request.getResponse();
// response.setLastResponse(true);
}
} catch (DmcValueException e) {
response = (GetResponse) request.getErrorResponse();
response.setResponseText(e.toString());
logger.error(e.toString());
} catch (Exception ex){
logger.error(DebugInfo.extractTheStack(ex));
response = (GetResponse) request.getErrorResponse();
response.setResponseText(DebugInfo.extractTheStack(ex));
}
logger.trace("Sending single response to original get request");