Skip to content

The Unified and Autonomous Development Platform

Add Oracle support

robin shine0214e9520d64
diff --git a/commons.hibernate/lib/ojdbc6.jar b/commons.hibernate/lib/ojdbc6.jar
new file mode 100644
index 0000000000..767eba7f8f
Binary files /dev/null and b/commons.hibernate/lib/ojdbc6.jar differ
diff --git a/commons.hibernate/pom.xml b/commons.hibernate/pom.xml
index 8209d790f3..66eb8c0775 100644
--- a/commons.hibernate/pom.xml
+++ b/commons.hibernate/pom.xml
@@ -58,7 +58,7 @@
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
- <version>2.4.3</version>
+ <version>2.4.5</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
@@ -88,10 +88,17 @@
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
- <version>3.0</version>
+ <version>4.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/sqljdbc4.jar</systemPath>
</dependency>
+ <dependency>
+ <groupId>com.oracle</groupId>
+ <artifactId>ojdbc6</artifactId>
+ <version>6.0</version>
+ <scope>system</scope>
+ <systemPath>${basedir}/lib/ojdbc6.jar</systemPath>
+ </dependency>
<dependency>
<groupId>com.pmease</groupId>
<artifactId>commons.jetty</artifactId>
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultDepotManager.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultDepotManager.java
index da1366f784..882b2c286a 100644
--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultDepotManager.java
+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultDepotManager.java
@@ -464,12 +464,6 @@ public class DefaultDepotManager extends AbstractEntityDao<Depot> implements Dep
logger.info("locked");
getSession().refresh(depot);
logger.info("refreshed");
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
logger.info("next request number: " + depot.getNextPullRequestNumber());
depot.setNextPullRequestNumber(depot.getNextPullRequestNumber()+1);
persist(depot);
diff --git a/gitplex.product/system/conf/hibernate.properties b/gitplex.product/system/conf/hibernate.properties
index 94c0794534..f530e6150c 100644
--- a/gitplex.product/system/conf/hibernate.properties
+++ b/gitplex.product/system/conf/hibernate.properties
@@ -86,29 +86,10 @@ hibernate.connection.password=
#hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
#hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
#hibernate.connection.url=jdbc:oracle:thin:@localhost:1521:XE
-#hibernate.connection.username=ora
-#hibernate.connection.password=ora
+#hibernate.connection.username=gitplex
+#hibernate.connection.password=gitplex
-#----------------------------------------------------------------------------------
-# To use DB2, please follow these steps:
-# 1. Copy DB2 JDBC driver in DB2 distribution to
-# "<@productName@ server install dir>/lib". The driver
-# file is typically named "db2jcc.jar" and can normally be found in "java" sub
-# directory under DB2 server's installation directory.
-# 2. Uncomment DB2 settings below and comment out settings for other databases.
-# 3. Create an empty DB2 database with page size set to at least 16k.
-# 4. Change the property "hibernate.connection.url", "hibernate.connection.username",
-# and "hibernate.connection.password" so that @productName@ can connect and write to
-# the database created in step 3.
-#----------------------------------------------------------------------------------
-
-#hibernate.dialect=org.hibernate.dialect.DB2Dialect
-#hibernate.connection.driver_class=com.ibm.db2.jcc.DB2Driver
-#hibernate.connection.url=jdbc:db2://localhost:50000/@dbName@
-#hibernate.connection.username=db2
-#hibernate.connection.password=db2
-
hibernate.connection.provider_class=org.hibernate.hikaricp.internal.HikariCPConnectionProvider
hibernate.hikari.autoCommit=false