Skip to content

Commit

Permalink
HHH-9956 - Enable derby database profile
Browse files Browse the repository at this point in the history
  • Loading branch information
sebersole committed Jul 21, 2015
1 parent b24ba54 commit 805600d
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 7 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Expand Up @@ -20,7 +20,7 @@ buildscript {
}
dependencies {
classpath 'org.hibernate.build.gradle:gradle-maven-publish-auth:2.0.1'
classpath 'org.hibernate.build.gradle:hibernate-matrix-testing:1.0.0-SNAPSHOT'
classpath 'org.hibernate.build.gradle:hibernate-matrix-testing:2.0.0-SNAPSHOT'
classpath 'org.hibernate.build.gradle:version-injection-plugin:1.0.0'
classpath 'org.hibernate.build.gradle:gradle-xjc-plugin:1.0.2.Final'
classpath 'com.github.lburgazzoli:lb-karaf-features-gen:1.0.0-SNAPSHOT'
Expand Down Expand Up @@ -137,7 +137,7 @@ subprojects { subProject ->
testRuntime( libraries.h2 )
testRuntime( libraries.woodstox )

testRuntime( 'org.mariadb.jdbc:mariadb-java-client:1.1.7' )
testRuntime( 'org.apache.derby:derby:10.10.2.0' )

// 6.6 gave me some NPE problems from within checkstyle...
checkstyle 'com.puppycrawl.tools:checkstyle:6.5'
Expand Down
1 change: 1 addition & 0 deletions databases/.gitignore
@@ -1,3 +1,4 @@
!mariadb/
!pgsql/
!derby/
./
42 changes: 42 additions & 0 deletions databases/derby/matrix.gradle
@@ -0,0 +1,42 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
//databaseProfile {
jdbcDependency 'org.apache.derby:derby:10.10.2.0'

// testing {
// beforeSuite {
// Test matrixTask = tasks.getByPath( 'matrix_derby' ) as Test
//
// // create the database
// project.ant {
// sql(
// driver: matrixTask.systemProperties.get( 'hibernate.connection.driver_class' ),
// url: 'jdbc:derby:hibernate_orm_test;create=true',
// userid: matrixTask.systemProperties.get( 'hibernate.connection.username' ),
// password: matrixTask.systemProperties.get( 'hibernate.connection.password' ),
// classpath: matrixTask.classpath.asPath,
// 'SELECT 1 FROM SYSIBM.SYSDUMMY1'
// )
// }
// }
//
//// afterSuite {
//// Test matrixTask = tasks.getByPath( 'matrix_derby' ) as Test
////
//// // shutdown the database
//// project.ant {
//// sql(
//// driver: matrixTask.systemProperties.get( 'hibernate.connection.driver_class' ),
//// url: 'jdbc:derby:hibernate_orm_test;shutdown=true',
//// userid: matrixTask.systemProperties.get( 'hibernate.connection.username' ),
//// password: matrixTask.systemProperties.get( 'hibernate.connection.password' ),
//// classpath: matrixTask.classpath.asPath
//// )
//// }
//// }
// }
//}
29 changes: 29 additions & 0 deletions databases/derby/resources/hibernate.properties
@@ -0,0 +1,29 @@
#
# Hibernate, Relational Persistence for Idiomatic Java
#
# License: GNU Lesser General Public License (LGPL), version 2.1 or later.
# See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
#

hibernate.dialect org.hibernate.dialect.DerbyTenSevenDialect
hibernate.connection.driver_class org.apache.derby.jdbc.EmbeddedDriver
hibernate.connection.url jdbc:derby:hibernate_orm_test
hibernate.connection.username hibernate_orm_test
hibernate.connection.password hibernate_orm_test

hibernate.connection.pool_size 5

hibernate.show_sql false
hibernate.format_sql true

hibernate.max_fetch_depth 5

hibernate.cache.region_prefix hibernate.test
hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory

# NOTE: hibernate.jdbc.batch_versioned_data should be set to false when testing with Oracle
hibernate.jdbc.batch_versioned_data true

javax.persistence.validation.mode=NONE
hibernate.service.allow_crawling=false
hibernate.session.events.log=true
17 changes: 12 additions & 5 deletions hibernate-core/src/test/resources/hibernate.properties
Expand Up @@ -5,11 +5,18 @@
# See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
#

hibernate.dialect org.hibernate.dialect.H2Dialect
hibernate.connection.driver_class org.h2.Driver
#hibernate.connection.url jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE
hibernate.connection.url jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1
hibernate.connection.username sa
#hibernate.dialect org.hibernate.dialect.H2Dialect
#hibernate.connection.driver_class org.h2.Driver
##hibernate.connection.url jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE
#hibernate.connection.url jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1
#hibernate.connection.username sa


hibernate.dialect org.hibernate.dialect.DerbyTenSevenDialect
hibernate.connection.driver_class org.apache.derby.jdbc.EmbeddedDriver
hibernate.connection.url jdbc:derby:hibernate_orm_test;create=true
hibernate.connection.username hibernate_orm_test
hibernate.connection.password hibernate_orm_test

hibernate.connection.pool_size 5

Expand Down

0 comments on commit 805600d

Please sign in to comment.