JDBC Thin Driver vs OCI
Açıklaması şöyle. Yani Java kullanıyorsak JDBC Thin Driver yeterli.
Oracle provides four types of drivers for their database, but I'll only enumerate the two you asked about.The OCI driver is a type 2 JDBC driver and uses native code to connect to the database. Thus, it is only an option on platforms that have native Oracle drivers available and it is not a "pure" Java implementation.Oracle's JDBC Thin driver is a type 4 JDBC Driver that uses Java sockets to connect directly to Oracle. It implements Oracle's SQL*Net TCP/IP protocol directly. Because it is 100% Java, it is platform independent ...
Maven
ojdbc "Oracle JDBC Driver" anlamına gelir
ojdbc11
Örnek
Şöyle yaparız
<dependency> <groupId>com.oracle.database.jdbc</groupId> <artifactId>ojdbc11</artifactId> <version>23.2.0.0</version> </dependency>
ojdbc10
Örnek
Şöyle yaparız
Java 11<dependency><groupId>com.oracle.database.jdbc</groupId><artifactId>ojdbc10</artifactId><version>${oracle.version}</version></dependency>Java 8<dependency><groupId>com.oracle.database.jdbc</groupId><artifactId>ojdbc8</artifactId><version>${oracle.version}</version></dependency>Java 6<dependency><groupId>com.oracle.database.jdbc</groupId><artifactId>ojdbc6</artifactId><version>${oracle.version}</version></dependency>
ojdbc8
Java 8 içindir
Örnek
Şöyle yaparız
<dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc8</artifactId> <version>19.7.0.0</version> </dependency>
Şöyle yaparız
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8-production</artifactId>
<version>21.7.0.0</version>
<type>pom</type>
</dependency>
ojdbc7
Java 8 öncesi içindir
Örnek
Şöyle yaparız.
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc7</artifactId>
<version>12.1.0.2</version>
</dependency>
Sınıflar
Connection Pool
Oracle Universal Connection Pool kullanılabilir.
Universal Connection Pool - PoolDataSource Sınıfı yazısına bakabilirsiniz.