Declare data source as JNDI name in Spring’s integration tests
SimpleNamingContextBuilder builder = new SimpleNamingContextBuilder(); builder.bind(jndiName, dataSource); builder.activate();
SimpleNamingContextBuilder builder = new SimpleNamingContextBuilder(); builder.bind(jndiName, dataSource); builder.activate();
The root context, normally seen as biz-layer context, is normally defined as "applicationContext.xml" and loaded by ContextLoaderListener. The other context, the web-layer one is normally defined as "mvc-servlet.xml" and loaded by DispatcherServlet. The web-layer context will inherit beans from the root one, Except some processors such as PropertyConfigurator. As a result, you should define two …
There are two Application Contexts in Spring MVC apps Read More »