Search code examples
javaspring-bootwebspheredatasourcejndi

IBM Websphere 8.5.5 use data source 4.0 version in Servlet 3.0


Is there any way to force Websphere 8.5.5.x to work with the data source 4.0 version and Servlet 3.0? I have the J2EE app that uses servlet 2.2 and data source 4.0. I want to upgrade the servlet version to 3.0 but when I try to do a data source JNDI lookup I get the error:

javax.naming.NamingException: Attempted to use a 4.0 DataSource from a 2.3 (or higher) servlet. Invalid configuration

I am asking because I have tried to work with the data source 4.0 version and Servlet 3.0 in Spring Boot application (used JNDI autoconfiguration) and this configuration works in Websphere 8.5.5.x. I am interested in how the Spring Boot datasource autoconfiguration solves this issue.


Solution

  • No, there is no way to force WAS to allow you to use DataSource 4.0 with servlet 2.3 or higher or an ejb 2.0 or higher. It is typically very easy to migrate from a 4.0 datasource to the newer version, but there can be some behavior differences. Is there some particular reason not to migrate to newer datasources?