Skip to content

Commit 9d87a3f

Browse files
OFBIZ-13412 - Removing a few remaining references of Derby and updating it with H2. Thank you Deepak Dixit for reporting about these references.
1 parent 8c3aa20 commit 9d87a3f

7 files changed

Lines changed: 14 additions & 14 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runtime/logs/*.log*
1313
runtime/logs/*.html*
1414
runtime/logs/test-results/*
1515
runtime/logs/birt
16-
runtime/data/derby/*
16+
runtime/data/h2/*
1717
runtime/data/utilcache.*
1818
runtime/catalina/work/*
1919
runtime/tempfiles/*

.hgignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
syntax: regexp
22
^(framework|applications|plugins)/[^/]+/build/.*$
33
^ofbiz\.jar$
4-
^runtime/data/derby/.*$
4+
^runtime/data/h2/.*$
55
^runtime/logs/.*(log|html)(|.\d+)$
66
^runtime/logs/access_log.\d\d\d\d-\d\d-\d\d$
77
^runtime/(catalina/work|logs/test-results)/.*$

DOCKER.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,15 @@ data, such as a chart of accounts.
158158

159159
==== Database
160160

161-
By default the OFBiz container will use an internal Derby database,
161+
By default the OFBiz container will use an internal H2 database,
162162
storing database related files in the /ofbiz/runtime volume.
163163

164164
Use of an external database can be configured through environment
165165
variables.
166166

167-
===== Derby
167+
===== H2
168168

169-
To use the embedded Derby database, ensure all database related
169+
To use the embedded H2 database, ensure all database related
170170
environment variables are unset.
171171

172172
===== PostgreSQL

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ following project parameters are passed:
464464
* tenantName: optional, default is value of tenantId
465465
* domainName: optional, default is org.apache.ofbiz
466466
* tenantReaders: optional, default value is seed,seed-initial,demo
467-
* dbPlatform: optional, D(Derby), M(MySQL), O(Oracle), P(PostgreSQL) (default D)
467+
* dbPlatform: optional, H(H2), M(MySQL), O(Oracle), P(PostgreSQL) (default D)
468468
* dbIp: optional, ip address of the database
469469
* dbUser: optional, username of the database
470470
* dbPassword: optional, password of the database
@@ -794,7 +794,7 @@ then the build execution will fail.
794794

795795
### Setup an external database like MySQL, PostgreSQL, etc
796796

797-
To setup an external database instead of the default embedded Apache Derby, you
797+
To setup an external database instead of the default embedded H2 database, you
798798
will need to follow the following instructions:
799799

800800
1. Find the JDBC driver suitable for your database using one of the following

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,17 +459,17 @@ task loadTenant(group: ofbizServer, description: 'Load data using tenantId') {
459459

460460
task createTenant(group: ofbizServer, description: 'Create a new tenant in your environment') {
461461

462-
def databaseTemplateFile = "${rootDir}/framework/resources/templates/AdminNewTenantData-Derby.xml"
462+
def databaseTemplateFile = "${rootDir}/framework/resources/templates/AdminNewTenantData-H2.xml"
463463

464464
task prepareAndValidateTenantArguments {
465465
doLast {
466466
if (!project.hasProperty('tenantId')) {
467467
throw new GradleException('Project property tenantId is missing')
468468
}
469-
// dbPlatform values: D(Derby), M(MySQL), O(Oracle), P(PostgreSQL) (default D)
469+
// dbPlatform values: H(H2), M(MySQL), O(Oracle), P(PostgreSQL) (default D)
470470
if (project.hasProperty('dbPlatform')) {
471-
if (dbPlatform == 'D') {
472-
databaseTemplateFile = "${rootDir}/framework/resources/templates/AdminNewTenantData-Derby.xml"
471+
if (dbPlatform == 'H') {
472+
databaseTemplateFile = "${rootDir}/framework/resources/templates/AdminNewTenantData-H2.xml"
473473
} else if (dbPlatform == 'M') {
474474
databaseTemplateFile = "${rootDir}/framework/resources/templates/AdminNewTenantData-MySQL.xml"
475475
} else if (dbPlatform == 'O') {

docker/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
# Default value: <empty>
6363
#
6464
# OFBIZ_SKIP_DB_DRIVER_DOWNLOAD
65-
# When connecting to databases other than the OFBiz embedded Derby database a suitable driver will be needed.
65+
# When connecting to databases other than the OFBiz embedded H2 database a suitable driver will be needed.
6666
# This script will attempt to download a suitable driver unless the OFBIZ_SKIP_DB_DRIVER_DOWNLOAD contains a non-empty
6767
# value.
6868
#

framework/entity/config/entityengine.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ access. For a detailed description see the core/docs/entityconfig.html file.
738738
http://support.microsoft.com/kb/820773/
739739
c. Demo data are in conflict with Entity Unique Index when loading data
740740
This is a known issue with MsSQL since https://markmail.org/message/mezqxb3eyzz3xpv6
741-
The problem does not exist with Derby, nor with the mostly open source DBMS used with OFBiz: Postres, MySQL, MariaDB, etc.
741+
The problem does not exist with H2, nor with the mostly open source DBMS used with OFBiz: Postres, MySQL, MariaDB, etc.
742742
So we will not change the current OOTB setting and suggest to simply change your own configuration. See OFBIZ-11998 for more.
743743
-->
744744
<datasource name="localmssql"
@@ -825,7 +825,7 @@ access. For a detailed description see the core/docs/entityconfig.html file.
825825
</datasource>
826826

827827
<!-- According to http://markmail.org/message/s75sf6zhtizzkqbv Since version V6R1 (AS/400, db2) there is no need for an own fieldtype.xml - just use the h2-fieldtypes like this: -->
828-
<!-- Beware use-indices-unique="false" is needed because of Derby bug with null values in a unique index, not sure it's needed with DB2 -->
828+
<!-- Beware use-indices-unique="false" is needed because of H2 bug with null values in a unique index, not sure it's needed with DB2 -->
829829
<datasource name="DB2"
830830
helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
831831
schema-name="OFBIZ"

0 commit comments

Comments
 (0)