Advertisement
Guest User

Untitled

a guest
Apr 7th, 2017
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. select value$ from props$ where name = 'global_db_name'
  2.  
  3. <Context antiResourceLocking="true" crossContext="true" path="/taquillas">
  4. <Resource auth="Container" driverClassName="oracle.jdbc.OracleDriver"
  5. factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
  6. jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer"
  7. jmxEnabled="true" url="jdbc:oracle:thin:@yyy.yyy.yyy.yyy:zzzz:ANNI"
  8. username="xxxxxxxxx" name="jdbc/andrea" password="xxxxxxx"
  9. type="javax.sql.DataSource" validationInterval="30000"
  10. maxActive="50" minIdle="1" maxWait="10000" defaultAutoCommit="false"
  11. initialSize="1" removeAbandonedTimeout="60"
  12. removeAbandoned="true" validationQuery="SELECT 1 FROM DUAL"/>
  13. </Context>
  14.  
  15. public dbutilsHandler()
  16. throws ClassNotFoundException, SQLException, NamingException {
  17. this.gson = new GsonBuilder()
  18. .setDateFormat("yyyy-MM-dd")
  19. .serializeNulls().create();
  20. InitialContext cxt;
  21. cxt = new InitialContext();
  22. this.ds = (DataSource) cxt.lookup("java:/comp/env/jdbc/andrea");
  23. this.query = new QueryRunner(ds);
  24. this.con = this.query.getDataSource().getConnection();
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement