Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8" ?>
- <!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
- -->
- <!--
- - This file configures the Entity Engine JDBC (or other DataSource) and JTA
- access. For a detailed description see the core/docs/entityconfig.html file.
- -->
- <entity-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entity-config.xsd">
- <resource-loader name="fieldfile" class="org.ofbiz.base.config.FileLoader"
- prepend-env="ofbiz.home" prefix="/framework/entity/fieldtype/"/>
- <!-- the transaction factory class to use, one is needed for each way of getting JTA interfaces -->
- <!-- Use this one for Geronimo -->
- <transaction-factory class="org.ofbiz.geronimo.GeronimoTransactionFactory"/>
- <!-- Use this one for getting the JTA objects from JNDI -->
- <!-- NOTE: to use the JndiFactory you must specify the necessary JNDI properties
- <transaction-factory class="org.ofbiz.entity.transaction.JNDIFactory">
- <user-transaction-jndi jndi-server-name="default" jndi-name="java:comp/UserTransaction"/>
- <transaction-manager-jndi jndi-server-name="default" jndi-name="java:comp/UserTransaction"/>
- </transaction-factory>
- -->
- <!--
- It is common to use UserTransaction for the TransactionManager, but if that doesn't work, try this: <transaction-manager-jndi jndi-server-name="default" jndi-name="java:comp/TransactionManager"/>
- Common UserTransaction locations:
- java:comp/UserTransaction (most servers: Resin, Orion, OC4J, etc)
- UserTransaction (RexIP)
- JBoss uses two different objects for the UserTransaction and TransactionManager interfaces;
- they are located in JNDI at: "java:comp/UserTransaction" and "java:/TransactionManager" respectively
- -->
- <!-- the connection factory class to use, one is needed for obtaining connections/pools for defined resources -->
- <connection-factory class="org.ofbiz.entity.connection.DBCPConnectionFactory"/>
- <debug-xa-resources value="false" /> <!-- see https://issues.apache.org/jira/browse/OFBIZ-4282 for more -->
- <delegator name="default"
- entity-model-reader="main"
- entity-group-reader="main"
- entity-eca-reader="main"
- distributed-cache-clear-enabled="false">
- <group-map group-name="org.ofbiz" datasource-name="localcassandra"/>
- <group-map group-name="org.ofbiz.olap" datasource-name="localcassandra"/>
- <group-map group-name="org.ofbiz.tenant" datasource-name="localcassandra"/>
- </delegator>
- <delegator name="default-no-eca" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" entity-eca-enabled="false" distributed-cache-clear-enabled="false">
- <group-map group-name="org.ofbiz" datasource-name="localcassandra"/>
- <group-map group-name="org.ofbiz.olap" datasource-name="localcassandra"/>
- <group-map group-name="org.ofbiz.tenant" datasource-name="localcassandra"/>
- </delegator>
- <!-- be sure that your default delegator (or the one you use) uses the same datasource for test. You must run "ant load-demo" before running "ant run-tests" -->
- <delegator name="test" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
- <group-map group-name="org.ofbiz" datasource-name="localcassandra"/>
- <group-map group-name="org.ofbiz.olap" datasource-name="localcassandra"/>
- <group-map group-name="org.ofbiz.tenant" datasource-name="localcassandra"/>
- </delegator>
- <!-- need to at least define a name for each component to use -->
- <entity-model-reader name="main"/>
- <!-- need to at least define a name for each component to use -->
- <entity-group-reader name="main"/>
- <!-- need to at least define a name for each component to use -->
- <entity-eca-reader name="main"/>
- <!-- need to at least define a name for each component to use -->
- <!-- defining:
- tenant = OFBiz and External Tenant Data
- seed = OFBiz and External Seed Data - to be maintained along with source and updated whenever a system deployment is updated
- seed-initial = OFBiz and External Seed Data - to be maintained along with source like other seed data, but only loaded initially and not updated when a system is updated except manually reviewing each line
- demo = OFBiz Only Demo Data
- ext = External General Data (custom)
- ext-test = External Test Data (custom)
- ext-demo = External Demo Data (custom)
- -->
- <entity-data-reader name="tenant"/>
- <entity-data-reader name="seed"/>
- <entity-data-reader name="seed-initial"/>
- <entity-data-reader name="demo"/>
- <entity-data-reader name="ext"/>
- <entity-data-reader name="ext-test"/>
- <entity-data-reader name="ext-demo"/>
- <field-type name="hsql" loader="fieldfile" location="fieldtypehsql.xml"/>
- <field-type name="derby" loader="fieldfile" location="fieldtypederby.xml"/>
- <field-type name="daffodil" loader="fieldfile" location="fieldtypedaffodil.xml"/>
- <field-type name="axion" loader="fieldfile" location="fieldtypeaxion.xml"/>
- <field-type name="mysql" loader="fieldfile" location="fieldtypemysql.xml"/>
- <field-type name="postgres" loader="fieldfile" location="fieldtypepostgres.xml"/>
- <field-type name="postnew" loader="fieldfile" location="fieldtypepostnew.xml"/>
- <field-type name="oracle" loader="fieldfile" location="fieldtypeoracle.xml"/>
- <field-type name="sapdb" loader="fieldfile" location="fieldtypesapdb.xml"/>
- <field-type name="sybase" loader="fieldfile" location="fieldtypesybase.xml"/>
- <field-type name="firebird" loader="fieldfile" location="fieldtypefirebird.xml"/>
- <field-type name="mssql" loader="fieldfile" location="fieldtypemssql.xml"/>
- <field-type name="advantage" loader="fieldfile" location="fieldtypeadvantage.xml"/>
- <field-type name="cassandra" loader="fieldfile" location="fieldtypecassandra.xml"/>
- <!--
- For DAO/JDBC Helper: Tries:
- 1. JNDI Datasource IF jdbc.jndi.name, context.provider, etc are specified
- 2. Embedded (JOTM) if available (uses jdbc.driver, jdbc.uri, jdbc.username, jdbc.password, isolation.level)
- 3. Direct to manually laoded JDBC driver (uses jdbc.driver, jdbc.uri, jdbc.username, jdbc.password)
- Transaction Isolation Levels - (<helperName>.isolation.level) can be as follows:
- * None
- * ReadCommitted (Recommended)
- * ReadUncommitted
- * RepeatableRead
- * Serializable (NOT Recommended)
- * Not set uses database default
- -->
- <datasource name="localderby"
- helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
- schema-name="OFBIZ"
- field-type-name="derby"
- check-on-start="true"
- add-missing-on-start="true"
- use-pk-constraint-names="false"
- use-indices-unique="false"
- alias-view-columns="false"
- use-order-by-nulls="true"
- offset-style="fetch">
- <read-data reader-name="tenant"/>
- <read-data reader-name="seed"/>
- <read-data reader-name="seed-initial"/>
- <read-data reader-name="demo"/>
- <read-data reader-name="ext"/>
- <read-data reader-name="ext-test"/>
- <read-data reader-name="ext-demo"/>
- <!-- beware use-indices-unique="false" is needed because of Derby bug with null values in a unique index -->
- <inline-jdbc
- jdbc-driver="org.apache.derby.jdbc.EmbeddedDriver"
- jdbc-uri="jdbc:derby:ofbiz;create=true"
- jdbc-username="ofbiz"
- jdbc-password-lookup="derby-ofbiz"
- isolation-level="ReadCommitted"
- pool-minsize="2"
- pool-maxsize="250"
- time-between-eviction-runs-millis="600000"/>
- <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/DerbyDataSource" isolation-level="ReadCommitted"/> -->
- </datasource>
- <datasource name="localderbyodbc"
- helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
- schema-name="OFBIZ"
- field-type-name="derby"
- check-on-start="true"
- add-missing-on-start="true"
- use-pk-constraint-names="false"
- use-indices-unique="false"
- alias-view-columns="false"
- use-order-by-nulls="true"
- offset-style="fetch">
- <!-- beware use-indices-unique="false" is needed because of Derby bug with null values in a unique index -->
- <inline-jdbc
- jdbc-driver="org.apache.derby.jdbc.EmbeddedDriver"
- jdbc-uri="jdbc:derby:ofbizodbc;create=true"
- jdbc-username="ofbiz"
- jdbc-password-lookup="derby-ofbizodbc"
- isolation-level="ReadCommitted"
- pool-minsize="2"
- pool-maxsize="250"
- time-between-eviction-runs-millis="600000"/>
- <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/DerbyDataSource" isolation-level="ReadCommitted"/> -->
- </datasource>
- <datasource name="localderbyolap"
- helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
- schema-name="OFBIZ"
- field-type-name="derby"
- check-on-start="true"
- add-missing-on-start="true"
- use-pk-constraint-names="false"
- use-indices-unique="false"
- alias-view-columns="false"
- use-order-by-nulls="true">
- <!-- beware use-indices-unique="false" is needed because of Derby bug with null values in a unique index -->
- <read-data reader-name="tenant"/>
- <read-data reader-name="seed"/>
- <read-data reader-name="seed-initial"/>
- <read-data reader-name="demo"/>
- <read-data reader-name="ext"/>
- <read-data reader-name="ext-test"/>
- <read-data reader-name="ext-demo"/>
- <inline-jdbc
- jdbc-driver="org.apache.derby.jdbc.EmbeddedDriver"
- jdbc-uri="jdbc:derby:ofbizolap;create=true"
- jdbc-username="ofbiz"
- jdbc-password-lookup="derby-ofbizolap"
- isolation-level="ReadCommitted"
- pool-minsize="2"
- pool-maxsize="250"
- time-between-eviction-runs-millis="600000"/>
- <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/DerbyDataSource" isolation-level="ReadCommitted"/> -->
- </datasource>
- <datasource name="localderbytenant"
- helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
- schema-name="OFBIZ"
- field-type-name="derby"
- check-on-start="true"
- add-missing-on-start="true"
- use-pk-constraint-names="false"
- use-indices-unique="false"
- alias-view-columns="false"
- use-order-by-nulls="true">
- <read-data reader-name="tenant"/>
- <read-data reader-name="seed"/>
- <read-data reader-name="seed-initial"/>
- <read-data reader-name="demo"/>
- <read-data reader-name="ext"/>
- <read-data reader-name="ext-test"/>
- <read-data reader-name="ext-demo"/>
- <!-- beware use-indices-unique="false" is needed because of Derby bug with null values in a unique index -->
- <inline-jdbc
- jdbc-driver="org.apache.derby.jdbc.EmbeddedDriver"
- jdbc-uri="jdbc:derby:ofbiztenant;create=true"
- jdbc-username="ofbiz"
- jdbc-password-lookup="derby-ofbiztenant"
- isolation-level="ReadCommitted"
- pool-minsize="2"
- pool-maxsize="250"
- time-between-eviction-runs-millis="600000"/>
- <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/DerbyDataSource" isolation-level="ReadCommitted"/> -->
- </datasource>
- <datasource name="localcassandra"
- helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
- schema-name="OFBIZ"
- field-type-name="cassandra"
- check-on-start="true"
- add-missing-on-start="true"
- use-pk-constraint-names="false"
- use-indices-unique="false"
- alias-view-columns="false"
- use-order-by-nulls="true"
- offset-style="fetch">
- <read-data reader-name="tenant"/>
- <read-data reader-name="seed"/>
- <read-data reader-name="seed-initial"/>
- <read-data reader-name="demo"/>
- <read-data reader-name="ext"/>
- <read-data reader-name="ext-test"/>
- <read-data reader-name="ext-demo"/>
- <inline-jdbc
- jdbc-driver="org.apache.cassandra.jdbc.EmbeddedDriver"
- jdbc-uri="jdbc:cassandra://127.0.0.1/ofbiz"
- jdbc-username="root"
- jdbc-password=""
- isolation-level="ReadCommitted"
- pool-minsize="2"
- pool-maxsize="250"
- time-between-eviction-runs-millis="600000"/>
- </datasource>
- </entity-config>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement