-1

I am analyzing dynamic web application and i am not able to find the datasource details anywhere in the application. In the application context all i could see is the below entry.

<je:jndi-lookup id="dataSource" jndi-name="java:comp/env/jdbc/App"/>
<je:jndi-lookup id="mySQLDataSource" jndi-name="java:comp/env/jdbc/App_MySQL"/>

The application is deployed in Tamcat server. Where will be the datasource defined? Is it possible the DB details are configured in tomcat server?

Thanks

C.K
  • 171
  • 1
  • 3
  • 14
  • "Is it possible the DB details are configured in tomcat server?" : possibly. I don't know about tomcat but JBoss EAP gives the possibility to define datasources in its domain or server configuration that will be accessible to its applications through JNDI – Aaron Feb 04 '16 at 17:14
  • Have you checked the META-INF/context.xml ? See https://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html#MySQL_DBCP_Example – Aaron Feb 04 '16 at 17:16

1 Answers1

-1

Found the answer. The datasource details are provided in the server.xml file present inside tomcat conf folder. It seems the datasource is common for application sharing the tomcat server(in my case more than 3 application are deployed in the server) and hence it was configured in tomcat.

C.K
  • 171
  • 1
  • 3
  • 14