When a data source configured in WebSphere is referenced in a web app, the name must be consistent with the Jndi name of the data source, or there will be an error that the data source cannot be found.
You only need to be consistent with the Jndi name when referencing the data source of was.
The data source that references Tomcat needs to be added: java:comp/env/+ data source name, such as: java:comp/env/jdbc/oracleds
The configuration data source in was is as follows:
A data source is defined in WebSphere with the Jndi name: Jdbc/oracle11g_datasource
This should be the case when referencing a data source in spring:
<!--DataSource config -<BeanID= "DataSource"class= "Org.springframework.jndi.JndiObjectFactoryBean"> < Propertyname= "Jndiname"> <value>Jdbc/oracle11g_datasource</value> </ Property></Bean>
How a data source configured in WebSphere is referenced in a web app