serviceRequest = LightNavigationManager.controlLightNavigation(request, serviceRequest);
requestContainer.setServiceRequest(serviceRequest);
//********************************************************************************************
Exception serviceException = null;
CoordinatorIFace coordinator = null;
try {
responseContainer.setErrorHandler(emfErrorHandler);
String channelType = Constants.HTTP_CHANNEL;
String channelTypeParameter = (String) (serviceRequest
.getAttribute(Constants.CHANNEL_TYPE));
String channelTypeHeader = (String) (requestContainer.getAttribute(HTTP_ACCEPT_HEADER));
if (((channelTypeParameter != null) && channelTypeParameter
.equalsIgnoreCase(Constants.WAP_CHANNEL))
|| ((channelTypeHeader != null) && (channelTypeHeader.indexOf(WAP_MIME_TYPE) != -1)))
channelType = Constants.WAP_CHANNEL;
requestContainer.setChannelType(channelType);
requestContainer.setInternalRequest(request);
requestContainer.setInternalResponse(response);
requestContainer.setAdapterConfig(getServletConfig());
TracerSingleton.log(Constants.NOME_MODULO, TracerSingleton.DEBUG,
"AdapterHTTP::service: requestContainer", requestContainer);
TracerSingleton.log(Constants.NOME_MODULO, TracerSingleton.DEBUG,
"AdapterHTTP::service: sessionContainer", requestContainer
.getSessionContainer());
SourceBean serviceResponse = new SourceBean(Constants.SERVICE_RESPONSE);
responseContainer.setServiceResponse(serviceResponse);
checkSession(session, requestContext);
Navigator.checkNavigation(requestContainer);
// Refresh service request because Navigator services can changed it
serviceRequest = requestContainer.getServiceRequest();
// Suspend/Resume service
handleSuspendResume(serviceRequest, requestContainer);
coordinator = DispatcherManager.getCoordinator(requestContext);
if (coordinator == null) {
TracerSingleton.log(Constants.NOME_MODULO, TracerSingleton.WARNING,
"AdapterHTTP::service: coordinator nullo !");
serviceException = new Exception("Coordinatore non trovato");
emfErrorHandler.addError(new EMFInternalError(EMFErrorSeverity.ERROR,
"Coordinatore non trovato !"));
} // if (coordinator == null)
else {
((RequestContextIFace) coordinator).setRequestContext(requestContext);
responseContainer.setBusinessType(coordinator.getBusinessType());
responseContainer.setBusinessName(coordinator.getBusinessName());
responseContainer.setPublisherName(coordinator.getPublisherName());
coordinator.service(serviceRequest, serviceResponse);
((RequestContextIFace) coordinator).setRequestContext(null);
// requestContainer.setInternalRequest(null);
} // if (coordinator == null) else
} // try
catch (Exception ex) {
ServiceIFace service = (coordinator != null)? coordinator.getService() : null;
exceptionHandler.handleException(ex, service, requestContext);
} // catch (Exception ex)
// requestContainer.setInternalResponse(null);
// requestContainer.setAdapterConfig(null);