2

I inherited a Java web application due to my expertise in .Net(I have no experience in Java). I need to change this:

http://**DatabaseOne**.Domain.com:Port/dir1/dir2

to this:

http://**DatabaseTwo**.Domain.com:Port/dir1/dir2

In .Net we have a Webconfig file where the connection strings are stored.
My research( Question 1 2 3 shows that there should be a Content.xml, Web.xml and/or Server.xml in a Java directory.

The Content and Web xmls that I have found, do not contain the connection strings I am looking for.

The DBManager.Java contains:

Public Connection getPoolConnection() throws JDBCConnectionException{
         return JDBCService.GetConnection("oracleUIPool");
 }

This Java web app seems to be a part of a larger Java web app, so the connection string must be somewhere at a higher level directory? What would be the name of this directory?

I did notice files named Beans, JetSpeed, and Struts, if that helps.

1
  • 1
    What application server are you using?? Commented Apr 24, 2012 at 19:15

2 Answers 2

1

Its in the application server configuration as a data source, check oracle-ds.xml or similar.

If you are using jboss, do a find . -iname '*ds*xml' or datasource and see if there is anything there. If you are using glassfish, check oraclePool settings using the web admin interface.

Sign up to request clarification or add additional context in comments.

Comments

0

Java works with the concept of a DataSource that could be managed by the server container: Tomcat, JBoss etc. Inside each server there's a lot of config files that could be used to configure the DataSorce. For each server and for each version there's configurations. The first step is know the server, the second is if the app is using a framework like Hibernate. Later, you will know the kind of configuration that you could use for it and, safely, you could find and change the URL.

Tomcat: http://blog.mangar.com.br/?p=57 JBoss: https://community.jboss.org/wiki/ConfigDataSources

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.