Skip to content

The Unified and Autonomous Development Platform

Add MS SQL server support

robin shine9d54cdaaea63
diff --git a/gitplex.product/system/conf/hibernate.properties b/gitplex.product/system/conf/hibernate.properties
index b8aed79782..94c0794534 100644
--- a/gitplex.product/system/conf/hibernate.properties
+++ b/gitplex.product/system/conf/hibernate.properties
@@ -1,127 +1,127 @@
-#----------------------------------------------------------------------------------
-# To use embedded HSQLDB database shipped with @productName@, please uncomment HSQLDB
-# database settings below and comment out settings for other databases.
-#----------------------------------------------------------------------------------
-
-hibernate.dialect=org.hibernate.dialect.HSQLDialect
-hibernate.connection.driver_class=org.hsqldb.jdbc.JDBCDriver
-hibernate.connection.url=jdbc:hsqldb:file:${installDir}/sampledb/@dbName@;shutdown=true
-hibernate.connection.username=sa
-hibernate.connection.password=
-
-
-#----------------------------------------------------------------------------------
-# To use MySQL database, please follow these steps:
-# 1. Uncomment MySQL settings below and comment out settings for other databases.
-# 2. Create an empty @productName@ schema at MySQL side.
-# 3. 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.
-# 4. Make sure the default storage engine of the MySQL server is set to "innodb". On
-# Unix systems, this normally can be done by editing "/etc/my.cnf" and set entry
-# "default-storage-engine=innodb".
-# 5. After @productName@ starts up, checks the @productName@ schema with MySQL toosl to make
-# sure all tables are of innodb type.
-#----------------------------------------------------------------------------------
-
-#hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
-#hibernate.connection.driver_class=com.mysql.jdbc.Driver
-#hibernate.connection.url=jdbc:mysql://localhost:3306/@dbName@
-#hibernate.connection.username=root
-#hibernate.connection.password=root
-
-
-#----------------------------------------------------------------------------------
-# To use PostgreSQL database, please follow these steps:
-# 1. Uncomment PostgreSQL settings below and comment out settings for other databases.
-# 2. Create an empty QuickBuild database at PostgreSQL side.
-# 3. Change the property "hibernate.connection.url", "hibernate.connection.username",
-# and "hibernate.connection.password" so that QuickBuild can connect and write to
-# the database created in step 3.
-#----------------------------------------------------------------------------------
-
-#hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
-#hibernate.connection.driver_class=org.postgresql.Driver
-#hibernate.connection.url=jdbc:postgresql://localhost:5432/@dbName@
-#hibernate.connection.username=postgres
-#hibernate.connection.password=postgres
-
-
-#----------------------------------------------------------------------------------
-# To use Microsoft SQL Server, please follow these steps:
-# 1. Enable tcp/ip access to SQL Server.
-# 2. Uncomment Microsoft SQL Server settings below and comment out settings for
-# other databases.
-# 3. Create an empty database at SQL Server side.
-# 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.SQLServerDialect
-#hibernate.connection.driver_class=net.sourceforge.jtds.jdbc.Driver
-#hibernate.connection.url=jdbc:jtds:sqlserver://localhost:1433/@dbName@
-#hibernate.connection.username=sa
-#hibernate.connection.password=sa
-
-
-#----------------------------------------------------------------------------------
-# To use Oracle, please follow these steps:
-# 1. Download JDBC driver for your Oracle version from
-# "http://search.oracle.com/search/search?start=1&search_p_main_operator=all&q=jdbc+driver&group=Technology+Network".
-# Put the driver under the "lib" sub directory of
-# @productName@ server's installation directory.
-# 2. Uncomment Oracle settings below and comment out settings for other databases.
-# 3. Create an empty Oracle database.
-# 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.
-# 5. Change property "hibernate.dialect" based on different Oracle versions:
-# 5.1 Use value "org.hibernate.dialect.Oracle9iDialect" if Oracle9i is used.
-# 5.2 Use value "org.hibernate.dialect.Oracle8iDialect" if Oracle8i is used.
-# 5.3 Use value "org.hibernate.dialect.Oracle10gDialect" if Oracle10g or 11g is
-# used.
-#----------------------------------------------------------------------------------
-
-#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
-
-
-#----------------------------------------------------------------------------------
-# 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
-hibernate.hikari.minimumIdle=5
-hibernate.hikari.maximumPoolSize=25
-
-hibernate.show_sql=false
-hibernate.format_sql=true
-hibernate.use_sql_comments=true
-
-javax.persistence.validation.mode=none
-hibernate.validator.apply_to_ddl=false
-hibernate.hbm2ddl.auto=update
-
-hibernate.cache.region.factory_class=org.hibernate.cache.ehcache.EhCacheRegionFactory
-hibernate.cache.use_query_cache=true
+#----------------------------------------------------------------------------------
+# To use embedded HSQLDB database shipped with @productName@, please uncomment HSQLDB
+# database settings below and comment out settings for other databases.
+#----------------------------------------------------------------------------------
+
+hibernate.dialect=org.hibernate.dialect.HSQLDialect
+hibernate.connection.driver_class=org.hsqldb.jdbc.JDBCDriver
+hibernate.connection.url=jdbc:hsqldb:file:${installDir}/sampledb/@dbName@;shutdown=true
+hibernate.connection.username=sa
+hibernate.connection.password=
+
+
+#----------------------------------------------------------------------------------
+# To use MySQL database, please follow these steps:
+# 1. Uncomment MySQL settings below and comment out settings for other databases.
+# 2. Create an empty @productName@ schema at MySQL side.
+# 3. 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.
+# 4. Make sure the default storage engine of the MySQL server is set to "innodb". On
+# Unix systems, this normally can be done by editing "/etc/my.cnf" and set entry
+# "default-storage-engine=innodb".
+# 5. After @productName@ starts up, checks the @productName@ schema with MySQL toosl to make
+# sure all tables are of innodb type.
+#----------------------------------------------------------------------------------
+
+#hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
+#hibernate.connection.driver_class=com.mysql.jdbc.Driver
+#hibernate.connection.url=jdbc:mysql://localhost:3306/@dbName@
+#hibernate.connection.username=root
+#hibernate.connection.password=root
+
+
+#----------------------------------------------------------------------------------
+# To use PostgreSQL database, please follow these steps:
+# 1. Uncomment PostgreSQL settings below and comment out settings for other databases.
+# 2. Create an empty QuickBuild database at PostgreSQL side.
+# 3. Change the property "hibernate.connection.url", "hibernate.connection.username",
+# and "hibernate.connection.password" so that QuickBuild can connect and write to
+# the database created in step 3.
+#----------------------------------------------------------------------------------
+
+#hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
+#hibernate.connection.driver_class=org.postgresql.Driver
+#hibernate.connection.url=jdbc:postgresql://localhost:5432/@dbName@
+#hibernate.connection.username=postgres
+#hibernate.connection.password=postgres
+
+
+#----------------------------------------------------------------------------------
+# To use Microsoft SQL Server, please follow these steps:
+# 1. Enable tcp/ip access to SQL Server.
+# 2. Uncomment Microsoft SQL Server settings below and comment out settings for
+# other databases.
+# 3. Create an empty database at SQL Server side.
+# 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.SQLServer2012Dialect
+#hibernate.connection.driver_class=com.microsoft.sqlserver.jdbc.SQLServerDriver
+#hibernate.connection.url=jdbc:sqlserver://localhost:1433;databaseName=gitplex
+#hibernate.connection.username=sa
+#hibernate.connection.password=sa
+
+
+#----------------------------------------------------------------------------------
+# To use Oracle, please follow these steps:
+# 1. Download JDBC driver for your Oracle version from
+# "http://search.oracle.com/search/search?start=1&search_p_main_operator=all&q=jdbc+driver&group=Technology+Network".
+# Put the driver under the "lib" sub directory of
+# @productName@ server's installation directory.
+# 2. Uncomment Oracle settings below and comment out settings for other databases.
+# 3. Create an empty Oracle database.
+# 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.
+# 5. Change property "hibernate.dialect" based on different Oracle versions:
+# 5.1 Use value "org.hibernate.dialect.Oracle9iDialect" if Oracle9i is used.
+# 5.2 Use value "org.hibernate.dialect.Oracle8iDialect" if Oracle8i is used.
+# 5.3 Use value "org.hibernate.dialect.Oracle10gDialect" if Oracle10g or 11g is
+# used.
+#----------------------------------------------------------------------------------
+
+#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
+
+
+#----------------------------------------------------------------------------------
+# 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
+hibernate.hikari.minimumIdle=5
+hibernate.hikari.maximumPoolSize=25
+
+hibernate.show_sql=false
+hibernate.format_sql=true
+hibernate.use_sql_comments=true
+
+javax.persistence.validation.mode=none
+hibernate.validator.apply_to_ddl=false
+hibernate.hbm2ddl.auto=update
+
+hibernate.cache.region.factory_class=org.hibernate.cache.ehcache.EhCacheRegionFactory
+hibernate.cache.use_query_cache=true
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/test/TestPage.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/test/TestPage.java
index e610910c6f..9119f8e176 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/page/test/TestPage.java
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/page/test/TestPage.java
@@ -37,10 +37,10 @@ public class TestPage extends BasePage {
};
new Thread(runnable).start();
new Thread(runnable).start();
-/* new Thread(runnable).start();
new Thread(runnable).start();
new Thread(runnable).start();
-*/ }
+ new Thread(runnable).start();
+ }
});
add(new Link<Void>("test2") {