2

we are planning to use Apache DBCP 2.1 for our connection pooling, We currently have following technology stack Tomcat 8 Jre 7 Oracle DB 11.2.0.1

As per the Apache DBCP home page the DBCP v2.1 only works with jre7 and it requires JDBC 4.1 drivers.

I am finding very hard to get the JDBC 4.1 drivers for Oracle DB. Also I am not sure if the Oracle 11.2.0.1 even supports JDBC 4.1 drivers.

I did a lot of research on google but was not able to find link or maven dependency to use JDBC 4.1 version.

Following is where I stumbled upon

Can I use Apache DBCP 2.1 with Oracle 11.2.0.1 in Tomcat 8 Where I can find Maven dependency for JDBC 4.1 drivers for Oracle DB

Note: I do not want to use tomcat DBCP

Shantanoo K
  • 765
  • 5
  • 15
  • 43

2 Answers2

1

Oracle 11g does not support JDBC 4.1. Only Oracle 12c does.

See this table on Oracle site that describes with versions of Java and JDBC is supported in which Oracle Database version.

Tunaki
  • 132,869
  • 46
  • 340
  • 423
0

(JDBC 4.1 is part of JDK 1.7)

I checked few versions of Oracle JDBC/ODBC drivers, but haven't find any sign of JDK 1.7 nor JDBC 4.1 compliance. So I assume it is not.

Can't you use different connection pool. We are working with c3p0 and I've seen it to be solid, if you tune it well.

Response to comment:

According table @Tunaki provided and Apache Commons DBCP site, yes your matrix is:

  • ODBC 11.2.0.4 (JDBC 4.0 compliant)
  • Apache DBCP 1.4 (JDBC 4.0 compliant)
  • JDK 1.7

EDIT2: Do you know that Apache DBCP is not consired as production ready by various sources:

http://docs.spring.io/spring-boot/docs/1.2.1.RELEASE/reference/htmlsingle/#boot-features-connect-to-production-database

http://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html#Introduction

Connection pooling options with JDBC: DBCP vs C3P0

Why do you have such crazy requirement?

Community
  • 1
  • 1
luboskrnac
  • 23,973
  • 10
  • 81
  • 92