logger.log(Level.FINE, "WSStartupServlet.contextInitialized");
final ServletContext servletContext = contextEvent.getServletContext();
final TCPContext context = new TCPServletContext(servletContext);
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
if (classLoader == null) {
classLoader = getClass().getClassLoader();
}
final ServletContainer container = new ServletContainer(servletContext);
try {
transportModule = WSTCPLifeCycleModule.getInstance();
final DeploymentDescriptorParser<TCPAdapter> parser = new DeploymentDescriptorParser<TCPAdapter>(
classLoader, new TCPResourceLoader(context), container, TCPAdapter.FACTORY);
final URL sunJaxWsXml = context.getResource(JAXWS_RI_RUNTIME);
if(sunJaxWsXml==null)
throw new WebServiceException(MessagesMessages.WSTCP_0014_NO_JAXWS_DESCRIPTOR());
adapters = parser.parse(sunJaxWsXml.toExternalForm(), sunJaxWsXml.openStream());
transportModule.register(servletContext.getContextPath(), adapters);
} catch (Exception e) {
logger.log(Level.SEVERE, e.getMessage(), e);
throw new IllegalStateException("listener.parsingFailed", e);
}