List of usage examples for org.springframework.web.context.support GenericWebApplicationContext getBean
@Override public <T> T getBean(String name, Class<T> requiredType) throws BeansException
From source file:com.centeractive.ws.server.core.SoapServer.java
private void configureWebContext() { ServletContext servletContext = getServletContext(); GenericWebApplicationContext webContext = new GenericWebApplicationContext(); webContext.setServletContext(servletContext); webContext.setParent(context);/* w w w . j a va 2s . c om*/ webContext.refresh(); servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, webContext); if (webContext != null) { endpoint = webContext.getBean(ENDPOINT_BEAN_NAME, GenericContextDomEndpoint.class); } }
From source file:org.reficio.ws.server.core.SoapServer.java
private void configureWebContext() { ServletContext servletContext = getServletContext(); GenericWebApplicationContext webContext = new GenericWebApplicationContext(); webContext.setServletContext(servletContext); webContext.setParent(context);/*from w ww . j a va2 s .c o m*/ webContext.refresh(); servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, webContext); if (webContext != null) { endpoint = webContext.getBean(SoapServerConstants.ENDPOINT_BEAN_NAME, GenericContextDomEndpoint.class); } }