Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //no maven, adicionar os parametros de profile
- <dsRhvEscalas>jdbc:oracle:thin:@10.9.0.51:1521:drhev</dsRhvEscalas>
- <dsRhvEscalas>jdbc:oracle:thin:@10.9.0.30:1532:hrhev</dsRhvEscalas>
- <dsRhvEscalas>jdbc:oracle:thin:@10.6.0.30:1521:prhev</dsRhvEscalas>
- //nas chamadas
- oraConn = (OracleConnection) getRhvEscalasConnection();
- private Connection getRhvEscalasConnection() throws Exception{
- Driver myDriver = new oracle.jdbc.driver.OracleDriver();
- ResourceBundle main = PropertyResourceBundle.getBundle("main.properties");
- DriverManager.registerDriver(myDriver);
- String jdbcUrl = main.getString("dsRhvEscalas");
- return DriverManager.getConnection(jdbcUrl,"rhvescalas","rhvescalas#01");
- }
- //no main.properties
- dsRhvEscalas = ${dsRhvEscalas}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement