Guest User

entityengine.xml

a guest
Aug 27th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 41.67 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one
  4. or more contributor license agreements.  See the NOTICE file
  5. distributed with this work for additional information
  6. regarding copyright ownership.  The ASF licenses this file
  7. to you under the Apache License, Version 2.0 (the
  8. "License"); you may not use this file except in compliance
  9. with the License.  You may obtain a copy of the License at
  10.  
  11. http://www.apache.org/licenses/LICENSE-2.0
  12.  
  13. Unless required by applicable law or agreed to in writing,
  14. software distributed under the License is distributed on an
  15. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  16. KIND, either express or implied.  See the License for the
  17. specific language governing permissions and limitations
  18. under the License.
  19. -->
  20. <!--
  21. - This file configures the Entity Engine JDBC (or other DataSource) and JTA
  22. access. For a detailed description see the core/docs/entityconfig.html file.
  23. -->
  24. <entity-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  25.        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entity-config.xsd">
  26.     <resource-loader name="fieldfile" class="org.apache.ofbiz.base.config.FileLoader"
  27.            prepend-env="ofbiz.home" prefix="/framework/entity/fieldtype/"/>
  28.  
  29.     <!-- the transaction factory class to use, one is needed for each way of getting JTA interfaces -->
  30.     <!-- Use this one for Geronimo -->
  31.     <transaction-factory class="org.apache.ofbiz.entity.transaction.GeronimoTransactionFactory"/>
  32.  
  33.     <!-- Use this one for getting the JTA objects from JNDI -->
  34.     <!-- NOTE: to use the JndiFactory you must specify the necessary JNDI properties
  35.    <transaction-factory class="org.apache.ofbiz.entity.transaction.JNDITransactionFactory">
  36.        <user-transaction-jndi jndi-server-name="default" jndi-name="java:comp/UserTransaction"/>
  37.        <transaction-manager-jndi jndi-server-name="default" jndi-name="java:comp/UserTransaction"/>
  38.    </transaction-factory>
  39.    -->
  40.     <!--
  41.        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"/>
  42.        Common UserTransaction locations:
  43.            java:comp/UserTransaction (most servers: Resin, Orion, OC4J, etc)
  44.            UserTransaction (RexIP)
  45.        JBoss uses two different objects for the UserTransaction and TransactionManager interfaces;
  46.        they are located in JNDI at: "java:comp/UserTransaction" and "java:/TransactionManager" respectively
  47.    -->
  48.  
  49.     <!-- the connection factory class to use, one is needed for obtaining connections/pools for defined resources -->
  50.     <connection-factory class="org.apache.ofbiz.entity.connection.DBCPConnectionFactory"/>
  51.  
  52.     <debug-xa-resources value="false" />  <!-- see https://issues.apache.org/jira/browse/OFBIZ-4282 for more -->
  53.    
  54.     <delegator name="default" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" distributed-cache-clear-enabled="false">
  55.         <group-map group-name="org.apache.ofbiz" datasource-name="localpostgres"/>
  56.         <group-map group-name="org.apache.ofbiz.olap" datasource-name="localpostolap"/>
  57.         <group-map group-name="org.apache.ofbiz.tenant" datasource-name="localposttenant"/>
  58.     </delegator>
  59.     <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">
  60.         <group-map group-name="org.apache.ofbiz" datasource-name="localpostgres"/>
  61.         <group-map group-name="org.apache.ofbiz.olap" datasource-name="localpostgolap"/>
  62.         <group-map group-name="org.apache.ofbiz.tenant" datasource-name="localposttenant"/>
  63.     </delegator>
  64.  
  65.     <!-- be sure that your default delegator (or the one you use) uses the same datasource for test. You must run "gradlew loadDefault" before running "gradlew testIntegration" -->
  66.     <delegator name="test" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
  67.         <group-map group-name="org.apache.ofbiz" datasource-name="localpostgres"/>
  68.         <group-map group-name="org.apache.ofbiz.olap" datasource-name="localpostolap"/>
  69.         <group-map group-name="org.apache.ofbiz.tenant" datasource-name="localposttenant"/>
  70.     </delegator>
  71.    
  72.     <!-- need to at least define a name for each component to use -->
  73.     <entity-model-reader name="main"/>
  74.  
  75.     <!-- need to at least define a name for each component to use -->
  76.     <entity-group-reader name="main"/>
  77.  
  78.     <!-- need to at least define a name for each component to use -->
  79.     <entity-eca-reader name="main"/>
  80.  
  81.     <!-- need to at least define a name for each component to use -->
  82.     <!-- defining:
  83.        tenant       = OFBiz and External Tenant Data
  84.        seed         = OFBiz and External Seed Data - to be maintained along with source and updated whenever a system deployment is updated
  85.        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
  86.        demo         = OFBiz Only Demo Data
  87.        ext          = External General Data (custom)
  88.        ext-test     = External Test Data (custom)
  89.        ext-demo     = External Demo Data (custom)
  90.    -->
  91.     <entity-data-reader name="tenant"/>
  92.     <entity-data-reader name="seed"/>
  93.     <entity-data-reader name="seed-initial"/>
  94.     <entity-data-reader name="demo"/>
  95.     <entity-data-reader name="ext"/>
  96.     <entity-data-reader name="ext-test"/>
  97.     <entity-data-reader name="ext-demo"/>
  98.  
  99.     <field-type name="hsql" loader="fieldfile" location="fieldtypehsql.xml"/>
  100.     <field-type name="derby" loader="fieldfile" location="fieldtypederby.xml"/>
  101.     <field-type name="daffodil" loader="fieldfile" location="fieldtypedaffodil.xml"/>
  102.     <field-type name="axion" loader="fieldfile" location="fieldtypeaxion.xml"/>
  103.     <field-type name="mysql" loader="fieldfile" location="fieldtypemysql.xml"/>
  104.     <field-type name="postgres" loader="fieldfile" location="fieldtypepostgres.xml"/>
  105.     <field-type name="oracle" loader="fieldfile" location="fieldtypeoracle.xml"/>
  106.     <field-type name="sapdb" loader="fieldfile" location="fieldtypesapdb.xml"/>
  107.     <field-type name="sybase" loader="fieldfile" location="fieldtypesybase.xml"/>
  108.     <field-type name="firebird" loader="fieldfile" location="fieldtypefirebird.xml"/>
  109.     <field-type name="mssql" loader="fieldfile" location="fieldtypemssql.xml"/>
  110.     <field-type name="advantage" loader="fieldfile" location="fieldtypeadvantage.xml"/>
  111.    
  112.     <!--
  113.    For DAO/JDBC Helper: Tries:
  114.      1. JNDI Datasource IF jdbc.jndi.name, context.provider, etc are specified
  115.      2. Embedded (JOTM) if available (uses jdbc.driver, jdbc.uri, jdbc.username, jdbc.password, isolation.level)
  116.      3. Direct to manually laoded JDBC driver (uses jdbc.driver, jdbc.uri, jdbc.username, jdbc.password)
  117.  
  118.    Transaction Isolation Levels - (<helperName>.isolation.level) can be as follows:
  119.     * None
  120.     * ReadCommitted (Recommended)
  121.     * ReadUncommitted
  122.     * RepeatableRead
  123.     * Serializable (NOT Recommended)
  124.     * Not set uses database default
  125.    -->
  126.    
  127.     <datasource name="localhsql"
  128.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  129.            field-type-name="hsql"
  130.            check-on-start="true"
  131.            add-missing-on-start="true"
  132.            check-indices-on-start="true"
  133.            use-foreign-keys="true"
  134.            use-foreign-key-indices="true"
  135.            use-fk-initially-deferred="false"
  136.            join-style="ansi-no-parenthesis"
  137.            alias-view-columns="true">
  138.         <read-data reader-name="tenant"/>
  139.         <read-data reader-name="seed"/>
  140.         <read-data reader-name="seed-initial"/>
  141.         <read-data reader-name="demo"/>
  142.         <read-data reader-name="ext"/>
  143.         <read-data reader-name="ext-test"/>
  144.         <read-data reader-name="ext-demo"/>
  145.         <inline-jdbc
  146.                jdbc-driver="org.hsqldb.jdbcDriver"
  147.                jdbc-uri="jdbc:hsqldb:runtime/data/hsqldb/ofbiz"
  148.                jdbc-username="ofbiz"
  149.                jdbc-password="ofbiz"
  150.                isolation-level="ReadCommitted"
  151.                pool-minsize="2"
  152.                pool-maxsize="250"
  153.                time-between-eviction-runs-millis="600000"/>
  154.         <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/HsqlDataSource" isolation-level="ReadUncommitted"/> -->
  155.         <!-- <jndi-jdbc jndi-server-name="default" jndi-name="comp/env/jdbc/xa/localhsql" isolation-level="ReadUncommitted"/> --> <!-- Orion Style JNDI name -->
  156.         <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="localhsqlDataSource"/> --> <!-- Weblogic Style JNDI name -->
  157.     </datasource>
  158.  
  159.     <datasource name="localderby"
  160.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  161.            schema-name="OFBIZ"
  162.            field-type-name="derby"
  163.            check-on-start="true"
  164.            add-missing-on-start="true"
  165.            use-pk-constraint-names="false"
  166.            use-indices-unique="false"
  167.            alias-view-columns="false"
  168.            use-order-by-nulls="true"
  169.            offset-style="fetch">
  170.         <read-data reader-name="tenant"/>
  171.         <read-data reader-name="seed"/>
  172.         <read-data reader-name="seed-initial"/>
  173.         <read-data reader-name="demo"/>
  174.         <read-data reader-name="ext"/>
  175.         <read-data reader-name="ext-test"/>
  176.         <read-data reader-name="ext-demo"/>
  177.         <!-- beware use-indices-unique="false" is needed because of Derby bug with null values in a unique index -->
  178.         <inline-jdbc
  179.                jdbc-driver="org.apache.derby.jdbc.EmbeddedDriver"
  180.                jdbc-uri="jdbc:derby:ofbiz;create=true"
  181.                jdbc-username="ofbiz"
  182.                jdbc-password-lookup="derby-ofbiz"
  183.                isolation-level="ReadCommitted"
  184.                pool-minsize="2"
  185.                pool-maxsize="250"
  186.                test-on-borrow="true"
  187.                pool-jdbc-test-stmt="values 1"
  188.                soft-min-evictable-idle-time-millis="600000"
  189.                time-between-eviction-runs-millis="600000"/>
  190.         <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/DerbyDataSource" isolation-level="ReadCommitted"/> -->
  191.     </datasource>
  192.     <datasource name="localderbyodbc"
  193.        helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  194.        schema-name="OFBIZ"
  195.        field-type-name="derby"
  196.        check-on-start="true"
  197.        add-missing-on-start="true"
  198.        use-pk-constraint-names="false"
  199.        use-indices-unique="false"
  200.        alias-view-columns="false"
  201.        use-order-by-nulls="true"
  202.        offset-style="fetch">
  203.         <!-- beware use-indices-unique="false" is needed because of Derby bug with null values in a unique index -->
  204.         <inline-jdbc
  205.            jdbc-driver="org.apache.derby.jdbc.EmbeddedDriver"
  206.            jdbc-uri="jdbc:derby:ofbizodbc;create=true"
  207.            jdbc-username="ofbiz"
  208.            jdbc-password-lookup="derby-ofbizodbc"
  209.            isolation-level="ReadCommitted"
  210.            pool-minsize="2"
  211.            pool-maxsize="250"
  212.                time-between-eviction-runs-millis="600000"/>
  213.         <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/DerbyDataSource" isolation-level="ReadCommitted"/> -->
  214.     </datasource>
  215.     <datasource name="localderbyolap"
  216.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  217.            schema-name="OFBIZ"
  218.            field-type-name="derby"
  219.            check-on-start="true"
  220.            add-missing-on-start="true"
  221.            use-pk-constraint-names="false"
  222.            use-indices-unique="false"
  223.            alias-view-columns="false"
  224.            use-order-by-nulls="true">
  225.         <!-- beware use-indices-unique="false" is needed because of Derby bug with null values in a unique index -->
  226.         <read-data reader-name="tenant"/>
  227.         <read-data reader-name="seed"/>
  228.         <read-data reader-name="seed-initial"/>
  229.         <read-data reader-name="demo"/>
  230.         <read-data reader-name="ext"/>
  231.         <read-data reader-name="ext-test"/>
  232.         <read-data reader-name="ext-demo"/>
  233.         <inline-jdbc
  234.                jdbc-driver="org.apache.derby.jdbc.EmbeddedDriver"
  235.                jdbc-uri="jdbc:derby:ofbizolap;create=true"
  236.                jdbc-username="ofbiz"
  237.                jdbc-password-lookup="derby-ofbizolap"
  238.                isolation-level="ReadCommitted"
  239.                pool-minsize="2"
  240.                pool-maxsize="250"
  241.                time-between-eviction-runs-millis="600000"/>
  242.         <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/DerbyDataSource" isolation-level="ReadCommitted"/> -->
  243.     </datasource>
  244.     <datasource name="localderbytenant"
  245.        helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  246.        schema-name="OFBIZ"
  247.        field-type-name="derby"
  248.        check-on-start="true"
  249.        add-missing-on-start="true"
  250.        use-pk-constraint-names="false"
  251.        use-indices-unique="false"
  252.        alias-view-columns="false"
  253.        use-order-by-nulls="true">
  254.         <read-data reader-name="tenant"/>
  255.         <read-data reader-name="seed"/>
  256.         <read-data reader-name="seed-initial"/>
  257.         <read-data reader-name="demo"/>
  258.         <read-data reader-name="ext"/>
  259.         <read-data reader-name="ext-test"/>
  260.         <read-data reader-name="ext-demo"/>
  261.         <!-- beware use-indices-unique="false" is needed because of Derby bug with null values in a unique index -->
  262.         <inline-jdbc
  263.            jdbc-driver="org.apache.derby.jdbc.EmbeddedDriver"
  264.            jdbc-uri="jdbc:derby:ofbiztenant;create=true"
  265.            jdbc-username="ofbiz"
  266.            jdbc-password-lookup="derby-ofbiztenant"
  267.            isolation-level="ReadCommitted"
  268.            pool-minsize="2"
  269.            pool-maxsize="250"
  270.            time-between-eviction-runs-millis="600000"/>
  271.         <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/DerbyDataSource" isolation-level="ReadCommitted"/> -->
  272.     </datasource>
  273.    
  274.     <datasource name="localdaffodil"
  275.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  276.            field-type-name="daffodil"
  277.            check-on-start="true"
  278.            add-missing-on-start="true">
  279.         <read-data reader-name="tenant"/>
  280.         <read-data reader-name="seed"/>
  281.         <read-data reader-name="seed-initial"/>
  282.         <read-data reader-name="demo"/>
  283.         <read-data reader-name="ext"/>
  284.         <read-data reader-name="ext-test"/>
  285.         <read-data reader-name="ext-demo"/>
  286.         <!-- this setup is for the embedded version of Daffodil, with in.co.daffodil.db.jdbc.DaffodilDBDriver -->
  287.         <!-- note that Daffodil can also run in a network mode with the driver class: in.co.daffodil.db.rmi.RmiDaffodilDBDriver and URI: jdbc:daffodilDB://<hostname>:<port>/ofbiz;create=true -->
  288.         <inline-jdbc
  289.                jdbc-driver="in.co.daffodil.db.jdbc.DaffodilDBDriver"
  290.                jdbc-uri="jdbc:daffodilDB_embedded:ofbiz;create=true"
  291.                jdbc-username="ofbiz"
  292.                jdbc-password="ofbiz"
  293.                isolation-level="ReadCommitted"
  294.                pool-minsize="2"
  295.                pool-maxsize="250"
  296.                time-between-eviction-runs-millis="600000"/>
  297.         <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/DaffodilDataSource" isolation-level="ReadCommitted"/> -->
  298.     </datasource>
  299.  
  300.     <datasource name="localaxion"
  301.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  302.            field-type-name="axion"
  303.            check-on-start="true"
  304.            add-missing-on-start="true"
  305.            use-pk-constraint-names="false">
  306.         <read-data reader-name="tenant"/>
  307.         <read-data reader-name="seed"/>
  308.         <read-data reader-name="seed-initial"/>
  309.         <read-data reader-name="demo"/>
  310.         <read-data reader-name="ext"/>
  311.         <read-data reader-name="ext-test"/>
  312.         <read-data reader-name="ext-demo"/>
  313.         <inline-jdbc
  314.                jdbc-driver="org.axiondb.jdbc.AxionDriver"
  315.                jdbc-uri="jdbc:axiondb:ofbiz:data/axion/ofbiz"
  316.                jdbc-username="ofbiz"
  317.                jdbc-password="ofbiz"
  318.                isolation-level="ReadCommitted"
  319.                pool-minsize="2"
  320.                pool-maxsize="250"
  321.                time-between-eviction-runs-millis="600000"/>
  322.     </datasource>
  323.  
  324.     <datasource name="localmysql"
  325.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  326.            field-type-name="mysql"
  327.            check-on-start="true"
  328.            add-missing-on-start="true"
  329.            check-pks-on-start="false"
  330.            use-foreign-keys="true"
  331.            join-style="ansi-no-parenthesis"
  332.            alias-view-columns="false"
  333.            drop-fk-use-foreign-key-keyword="true"
  334.            table-type="InnoDB"
  335.            character-set="latin1"
  336.            collate="latin1_general_cs">
  337.         <read-data reader-name="tenant"/>
  338.         <read-data reader-name="seed"/>
  339.         <read-data reader-name="seed-initial"/>
  340.         <read-data reader-name="demo"/>
  341.         <read-data reader-name="ext"/>
  342.         <read-data reader-name="ext-test"/>
  343.         <read-data reader-name="ext-demo"/>
  344.         <inline-jdbc
  345.                jdbc-driver="com.mysql.jdbc.Driver"
  346.                jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true"
  347.                jdbc-username="ofbiz"
  348.                jdbc-password="ofbiz"
  349.                isolation-level="ReadCommitted"
  350.                pool-minsize="2"
  351.                pool-maxsize="250"
  352.                time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL
  353.                and had to set it to -1 in order to avoid this issue.
  354.                For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->
  355.         <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
  356.     </datasource>
  357.     <datasource name="localmysqlolap"
  358.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  359.            field-type-name="mysql"
  360.            check-on-start="true"
  361.            add-missing-on-start="true"
  362.            check-pks-on-start="false"
  363.            use-foreign-keys="true"
  364.            join-style="ansi-no-parenthesis"
  365.            alias-view-columns="false"
  366.            drop-fk-use-foreign-key-keyword="true"
  367.            table-type="InnoDB"
  368.            character-set="latin1"
  369.            collate="latin1_general_cs">
  370.         <read-data reader-name="tenant"/>
  371.         <read-data reader-name="seed"/>
  372.         <read-data reader-name="seed-initial"/>
  373.         <read-data reader-name="demo"/>
  374.         <read-data reader-name="ext"/>
  375.         <read-data reader-name="ext-test"/>
  376.         <read-data reader-name="ext-demo"/>
  377.         <inline-jdbc
  378.                jdbc-driver="com.mysql.jdbc.Driver"
  379.                jdbc-uri="jdbc:mysql://127.0.0.1/ofbizolap?autoReconnect=true"
  380.                jdbc-username="ofbiz"
  381.                jdbc-password="ofbiz"
  382.                isolation-level="ReadCommitted"
  383.                pool-minsize="2"
  384.                pool-maxsize="250"
  385.                time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL
  386.                and had to set it to -1 in order to avoid this issue.
  387.                For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->
  388.         <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
  389.     </datasource>
  390.     <datasource name="localmysqltenant"
  391.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  392.            field-type-name="mysql"
  393.            check-on-start="true"
  394.            add-missing-on-start="true"
  395.            check-pks-on-start="false"
  396.            use-foreign-keys="true"
  397.            join-style="ansi-no-parenthesis"
  398.            alias-view-columns="false"
  399.            drop-fk-use-foreign-key-keyword="true"
  400.            table-type="InnoDB"
  401.            character-set="latin1"
  402.            collate="latin1_general_cs">
  403.         <read-data reader-name="tenant"/>
  404.         <read-data reader-name="seed"/>
  405.         <read-data reader-name="seed-initial"/>
  406.         <read-data reader-name="demo"/>
  407.         <read-data reader-name="ext"/>
  408.         <read-data reader-name="ext-test"/>
  409.         <read-data reader-name="ext-demo"/>
  410.         <inline-jdbc
  411.                jdbc-driver="com.mysql.jdbc.Driver"
  412.                jdbc-uri="jdbc:mysql://127.0.0.1/ofbiztenant?autoReconnect=true"
  413.                jdbc-username="ofbiz"
  414.                jdbc-password="ofbiz"
  415.                isolation-level="ReadCommitted"
  416.                pool-minsize="2"
  417.                pool-maxsize="250"
  418.                time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL
  419.                and had to set it to -1 in order to avoid this issue.
  420.                For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->
  421.         <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
  422.     </datasource>
  423.     <datasource name="odbcmysql"
  424.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  425.            field-type-name="mysql"
  426.            check-on-start="true"
  427.            add-missing-on-start="true"
  428.            check-pks-on-start="false"
  429.            use-foreign-keys="true"
  430.            join-style="ansi-no-parenthesis"
  431.            alias-view-columns="false"
  432.            drop-fk-use-foreign-key-keyword="true"
  433.            table-type="InnoDB"
  434.            character-set="latin1"
  435.            collate="latin1_general_cs">
  436.         <read-data reader-name="tenant"/>
  437.         <read-data reader-name="seed"/>
  438.         <inline-jdbc
  439.                jdbc-driver="com.mysql.jdbc.Driver"
  440.                jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz_odbc?autoReconnect=true"
  441.                jdbc-username="ofbiz"
  442.                jdbc-password="ofbiz"
  443.                isolation-level="ReadCommitted"
  444.                pool-minsize="2"
  445.                pool-maxsize="250"
  446.                time-between-eviction-runs-millis="600000"/>
  447.         <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
  448.     </datasource>
  449.  
  450.     <datasource name="localpostgres"
  451.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  452.            schema-name="ofbiz"
  453.            field-type-name="postgres"
  454.            check-on-start="true"
  455.            add-missing-on-start="true"
  456.            use-fk-initially-deferred="false"
  457.            alias-view-columns="false"
  458.            join-style="ansi"
  459.            use-binary-type-for-blob="true"
  460.            use-order-by-nulls="true"
  461.            result-fetch-size="50"> <!-- Comment out the result-fetch-size attribute for jdbc driver versions older than 8.0.
  462.            Not recommended to use those though. They are archived unsupported versions: http://jdbc.postgresql.org/download.html -->
  463.        
  464.         <read-data reader-name="tenant"/>
  465.         <read-data reader-name="seed"/>
  466.         <read-data reader-name="seed-initial"/>
  467.         <read-data reader-name="demo"/>
  468.         <read-data reader-name="ext"/>
  469.         <read-data reader-name="ext-test"/>
  470.         <read-data reader-name="ext-demo"/>
  471.         <inline-jdbc
  472.                jdbc-driver="org.postgresql.Driver"
  473.                jdbc-uri="jdbc:postgresql://127.0.0.1/ofbiz_redgrape"
  474.                jdbc-username="ofbiz_redgrape"
  475.                jdbc-password="YOU PASS HERE"
  476.                isolation-level="ReadCommitted"
  477.                pool-minsize="2"
  478.                pool-maxsize="250"
  479.                time-between-eviction-runs-millis="600000"/><!-- Be warned that at this date (2009-09-20) the max_connections parameters in postgresql.conf
  480.                is set by default to 100 by the initdb process see http://www.postgresql.org/docs/8.4/static/runtime-config-connection.html#GUC-MAX-CONNECTIONS-->
  481.  
  482.         <!-- <jndi-jdbc jndi-server-name="default" jndi-name="java:comp/env/jdbc/localpostgres" isolation-level="ReadCommitted"/>-->
  483.         <!-- <jndi-jdbc jndi-server-name="default" jndi-name="comp/env/jdbc/xa/localpostgres" isolation-level="ReadCommitted"/> --> <!-- Orion Style JNDI name -->
  484.         <!-- <jndi-jdbc jndi-server-name="localweblogic" jndi-name="PostgresDataSource"/> --> <!-- Weblogic Style JNDI name -->
  485.         <!-- <jndi-jdbc jndi-server-name="default" jndi-name="jdbc/localpostgres" isolation-level="ReadCommitted"/> --> <!-- JRun4 Style JNDI name -->
  486.         <!-- <tyrex-dataSource dataSource-name="localpostgres" isolation-level="ReadCommitted"/> -->
  487.     </datasource>
  488.     <datasource name="localpostolap"
  489.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  490.            schema-name="ofbiz"
  491.            field-type-name="postgres"
  492.            check-on-start="true"
  493.            add-missing-on-start="true"
  494.            use-fk-initially-deferred="false"
  495.            alias-view-columns="false"
  496.            join-style="ansi"
  497.            result-fetch-size="50"
  498.            use-binary-type-for-blob="true"
  499.            use-order-by-nulls="true">
  500.         <read-data reader-name="tenant"/>
  501.         <read-data reader-name="seed"/>
  502.         <read-data reader-name="seed-initial"/>
  503.         <read-data reader-name="demo"/>
  504.         <read-data reader-name="ext"/>
  505.         <read-data reader-name="ext-test"/>
  506.         <read-data reader-name="ext-demo"/>
  507.         <inline-jdbc
  508.                jdbc-driver="org.postgresql.Driver"
  509.                jdbc-uri="jdbc:postgresql://127.0.0.1/ofbiz_redgrape"
  510.                jdbc-username="ofbiz_redgrape"
  511.                jdbc-password="YOUR PASS HERE"
  512.                isolation-level="ReadCommitted"
  513.                pool-minsize="2"
  514.                pool-maxsize="250"
  515.                time-between-eviction-runs-millis="600000"/><!-- Be warned that at this date (2009-09-20) the max_connections parameters in postgresql.conf
  516.                    is set by default to 100 by the initdb process see http://www.postgresql.org/docs/8.4/static/runtime-config-connection.html#GUC-MAX-CONNECTIONS-->
  517.        
  518.         <!-- <jndi-jdbc jndi-server-name="default" jndi-name="java:comp/env/jdbc/localpostgres" isolation-level="ReadCommitted"/>-->
  519.         <!-- <jndi-jdbc jndi-server-name="default" jndi-name="comp/env/jdbc/xa/localpostgres" isolation-level="ReadCommitted"/> --> <!-- Orion Style JNDI name -->
  520.         <!-- <jndi-jdbc jndi-server-name="localweblogic" jndi-name="PostgresDataSource"/> --> <!-- Weblogic Style JNDI name -->
  521.         <!-- <jndi-jdbc jndi-server-name="default" jndi-name="jdbc/localpostgres" isolation-level="ReadCommitted"/> --> <!-- JRun4 Style JNDI name -->
  522.         <!-- <tyrex-dataSource dataSource-name="localpostgres" isolation-level="ReadCommitted"/> -->
  523.     </datasource>
  524.     <datasource name="localposttenant"
  525.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  526.            schema-name="ofbiz"
  527.            field-type-name="postgres"
  528.            check-on-start="true"
  529.            add-missing-on-start="true"
  530.            use-fk-initially-deferred="false"
  531.            alias-view-columns="false"
  532.            join-style="ansi"
  533.            result-fetch-size="50"
  534.            use-binary-type-for-blob="true"
  535.            use-order-by-nulls="true">
  536.         <read-data reader-name="tenant"/>
  537.         <read-data reader-name="seed"/>
  538.         <read-data reader-name="seed-initial"/>
  539.         <read-data reader-name="demo"/>
  540.         <read-data reader-name="ext"/>
  541.         <read-data reader-name="ext-test"/>
  542.         <read-data reader-name="ext-demo"/>
  543.         <inline-jdbc
  544.                jdbc-driver="org.postgresql.Driver"
  545.                jdbc-uri="jdbc:postgresql://127.0.0.1/ofbiz_redgrape"
  546.                jdbc-username="ofbiz_redgrape"
  547.                jdbc-password="YOUR PASS HERE"
  548.                isolation-level="ReadCommitted"
  549.                pool-minsize="2"
  550.                pool-maxsize="250"
  551.                time-between-eviction-runs-millis="600000"/><!-- Be warned that at this date (2009-09-20) the max_connections parameters in postgresql.conf
  552.                    is set by default to 100 by the initdb process see http://www.postgresql.org/docs/8.4/static/runtime-config-connection.html#GUC-MAX-CONNECTIONS-->
  553.        
  554.         <!-- <jndi-jdbc jndi-server-name="default" jndi-name="java:comp/env/jdbc/localpostgres" isolation-level="ReadCommitted"/>-->
  555.         <!-- <jndi-jdbc jndi-server-name="default" jndi-name="comp/env/jdbc/xa/localpostgres" isolation-level="ReadCommitted"/> --> <!-- Orion Style JNDI name -->
  556.         <!-- <jndi-jdbc jndi-server-name="localweblogic" jndi-name="PostgresDataSource"/> --> <!-- Weblogic Style JNDI name -->
  557.         <!-- <jndi-jdbc jndi-server-name="default" jndi-name="jdbc/localpostgres" isolation-level="ReadCommitted"/> --> <!-- JRun4 Style JNDI name -->
  558.         <!-- <tyrex-dataSource dataSource-name="localpostgres" isolation-level="ReadCommitted"/> -->
  559.     </datasource>
  560.  
  561.     <datasource name="localoracle"
  562.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  563.            schema-name="OFBIZ"
  564.            field-type-name="oracle"
  565.            check-on-start="true"
  566.            add-missing-on-start="true"
  567.            alias-view-columns="false"
  568.            join-style="ansi"
  569.            use-order-by-nulls="true">
  570.         <read-data reader-name="tenant"/>
  571.         <read-data reader-name="seed"/>
  572.         <read-data reader-name="seed-initial"/>
  573.         <read-data reader-name="demo"/>
  574.         <read-data reader-name="ext"/>
  575.         <read-data reader-name="ext-test"/>
  576.         <read-data reader-name="ext-demo"/>
  577.         <inline-jdbc
  578.                jdbc-driver="oracle.jdbc.driver.OracleDriver"
  579.                jdbc-uri="jdbc:oracle:thin:@127.0.0.1:1521:ofbiz"
  580.                jdbc-username="ofbiz"
  581.                jdbc-password="ofbiz"
  582.                pool-minsize="2"
  583.                pool-maxsize="250"
  584.                time-between-eviction-runs-millis="600000"/>
  585.     </datasource>
  586.     <datasource name="localoracledd"
  587.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  588.            schema-name="OFBIZ"
  589.            field-type-name="oracle"
  590.            check-on-start="true"
  591.            add-missing-on-start="true"
  592.            join-style="ansi"
  593.            use-order-by-nulls="true">
  594.         <read-data reader-name="main"/>
  595.         <inline-jdbc
  596.                jdbc-driver="com.ddtek.jdbc.oracle.OracleDriver"
  597.                jdbc-uri="jdbc:datadirect:oracle://127.0.0.1:1521;SID=ofbiz"
  598.                jdbc-username="ofbiz"
  599.                jdbc-password="ofbiz"
  600.                pool-minsize="2"
  601.                pool-maxsize="250"
  602.                time-between-eviction-runs-millis="600000"/>
  603.     </datasource>
  604.  
  605.     <datasource name="localsybase"
  606.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  607.            field-type-name="sybase"
  608.            schema-name="dbo"
  609.            check-on-start="true"
  610.            add-missing-on-start="true"
  611.            use-fk-initially-deferred="false"
  612.            join-style="ansi">
  613.         <read-data reader-name="tenant"/>
  614.         <read-data reader-name="seed"/>
  615.         <read-data reader-name="seed-initial"/>
  616.         <read-data reader-name="demo"/>
  617.         <read-data reader-name="ext"/>
  618.         <read-data reader-name="ext-test"/>
  619.         <read-data reader-name="ext-demo"/>
  620.         <inline-jdbc
  621.                jdbc-driver="com.sybase.jdbc2.jdbc.SybDriver"
  622.                jdbc-uri="jdbc:sybase:Tds:10.1.1.10:11222/ofbiz?DYNAMIC_PREPARE=true"
  623.                jdbc-username="ofbiz"
  624.                jdbc-password="ofbiz1"
  625.                isolation-level="ReadCommitted"
  626.                pool-minsize="2"
  627.                pool-maxsize="250"
  628.                time-between-eviction-runs-millis="600000"/>
  629.     </datasource>
  630.  
  631.     <datasource name="localsapdb"
  632.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  633.            field-type-name="sapdb"
  634.            check-on-start="true"
  635.            add-missing-on-start="true"
  636.            fk-style="name_fk"
  637.            use-fk-initially-deferred="false"
  638.            join-style="ansi-no-parenthesis">
  639.         <read-data reader-name="tenant"/>
  640.         <read-data reader-name="seed"/>
  641.         <read-data reader-name="seed-initial"/>
  642.         <read-data reader-name="demo"/>
  643.         <read-data reader-name="ext"/>
  644.         <read-data reader-name="ext-test"/>
  645.         <read-data reader-name="ext-demo"/>
  646.         <inline-jdbc
  647.                jdbc-driver="com.sap.dbtech.jdbc.DriverSapDB"
  648.                jdbc-uri="jdbc:sapdb://localhost/OFBIZ"
  649.                jdbc-username="ofbiz"
  650.                jdbc-password="ofbiz"
  651.                isolation-level="ReadCommitted"
  652.                pool-minsize="2"
  653.                pool-maxsize="250"
  654.                time-between-eviction-runs-millis="600000"/>
  655.         <!-- <jndi-jdbc jndi-server-name="default" jndi-name="comp/env/jdbc/xa/localsapdb" isolation-level="ReadCommitted"/> --> <!-- Orion Style JNDI name -->
  656.         <!-- <jndi-jdbc jndi-server-name="localweblogic" jndi-name="SapDBDataSource"/> --> <!-- Weblogic Style JNDI name -->
  657.         <!-- <jndi-jdbc jndi-server-name="default" jndi-name="jdbc/localsapdb" isolation-level="ReadCommitted"/> --> <!-- JRun4 Style JNDI name -->
  658.         <!-- <tyrex-dataSource dataSource-name="localsapdb" isolation-level="ReadCommitted"/> -->
  659.     </datasource>
  660.  
  661.     <datasource name="localfirebird"
  662.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  663.            field-type-name="firebird"
  664.            check-on-start="true"
  665.            use-foreign-key-indices="false"
  666.            add-missing-on-start="true"
  667.            alias-view-columns="false"
  668.            join-style="ansi">
  669.         <read-data reader-name="tenant"/>
  670.         <read-data reader-name="seed"/>
  671.         <read-data reader-name="seed-initial"/>
  672.         <read-data reader-name="demo"/>
  673.         <read-data reader-name="ext"/>
  674.         <read-data reader-name="ext-test"/>
  675.         <read-data reader-name="ext-demo"/>
  676.         <inline-jdbc
  677.                jdbc-driver="org.firebirdsql.jdbc.FBDriver"
  678.                jdbc-uri="jdbc:firebirdsql:127.0.0.1:C:\\data\\ofbiz.gdb"
  679.                jdbc-username="SYSDBA"
  680.                jdbc-password="masterkey"
  681.                isolation-level="ReadCommitted"
  682.                pool-minsize="2"
  683.                pool-maxsize="250"
  684.                time-between-eviction-runs-millis="600000"/>
  685.         <!-- Sample remote URI: jdbc-uri="jdbc:firebirdsql://localhost:3050//opt/interbase/data/ofbiz.gdb" -->
  686.         <!-- <jndi-jdbc jndi-server-name="default" jndi-name="comp/env/jdbc/xa/localfirebird" isolation-level="ReadCommitted"/> --> <!-- Orion Style JNDI name -->
  687.         <!-- <tyrex-dataSource dataSource-name="firebird" isolation-level="ReadCommitted"/> -->
  688.     </datasource>
  689.     <!--
  690.     The following has been tested with SQL Server 2005 + MS SQL Server JDBC Driver 1.1
  691.     Tips:
  692.      1. Make sure your SQL Server has mixed mode authentication as per this post:
  693.       http://aspadvice.com/blogs/plitwin/archive/2006/09/10/Login-failed-_2E002E002E00_-not-associated-with-a-trusted-SQL-server-connection.aspx
  694.      2. Make sure you have copied JDBC driver jar to entity/lib/jdbc
  695.      3. Make sure you have installed JDBC Driver XA support as per MSSQL_JDBC_HOME/enu/xa/xa_install.sql
  696.      4. Make sure that you have created and authorized the ofbiz database and login
  697.      5. Make sure that schema-name, jdbc-username, jdbc-password and databaseName are all correct!
  698.  
  699.     Notes:
  700.     a. The reason for putting SelectMethod=cursor property in URL is explained here:
  701.      http://forum.java.sun.com/thread.jspa?forumID=48&threadID=184797
  702.     b. If using an old version of the driver, beware of this resource leak:
  703.      http://support.microsoft.com/kb/820773/
  704.    -->
  705.     <datasource name="localmssql"
  706.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  707.            schema-name="dbo"
  708.            field-type-name="mssql"
  709.            check-on-start="true"
  710.            add-missing-on-start="true"
  711.            join-style="ansi"
  712.            alias-view-columns="false"
  713.            use-fk-initially-deferred="false">
  714.         <read-data reader-name="tenant"/>
  715.         <read-data reader-name="seed"/>
  716.         <read-data reader-name="seed-initial"/>
  717.         <read-data reader-name="demo"/>
  718.         <read-data reader-name="ext"/>
  719.         <read-data reader-name="ext-test"/>
  720.         <read-data reader-name="ext-demo"/>
  721.         <inline-jdbc
  722.                jdbc-driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
  723.                jdbc-uri="jdbc:sqlserver://localhost:1791;databaseName=ofbiz;SelectMethod=cursor;"
  724.                jdbc-username="ofbiz"
  725.                jdbc-password="ofbiz"
  726.                isolation-level="ReadCommitted"
  727.                pool-minsize="2"
  728.                pool-maxsize="250"
  729.                time-between-eviction-runs-millis="600000"/>
  730.         <!-- <jndi-jdbc jndi-server-name="default" jndi-name="comp/env/jdbc/xa/localmssql" isolation-level="ReadCommitted"/> --> <!-- Orion Style JNDI name -->
  731.     </datasource>
  732.  
  733.     <datasource name="localp6spy"
  734.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  735.            schema-name="public"
  736.            field-type-name="postgres"
  737.            check-on-start="true"
  738.            add-missing-on-start="true"
  739.            join-style="ansi">
  740.         <read-data reader-name="tenant"/>
  741.         <read-data reader-name="seed"/>
  742.         <read-data reader-name="seed-initial"/>
  743.         <read-data reader-name="demo"/>
  744.         <read-data reader-name="ext"/>
  745.         <read-data reader-name="ext-test"/>
  746.         <read-data reader-name="ext-demo"/>
  747.         <inline-jdbc
  748.                jdbc-driver="com.p6spy.engine.spy.P6SpyDriver"
  749.                jdbc-uri="jdbc:postgresql://127.0.0.1/ofbiz"
  750.                jdbc-username="ofbiz"
  751.                jdbc-password="ofbiz"
  752.                isolation-level="ReadCommitted"
  753.                pool-minsize="2"
  754.                pool-maxsize="250"
  755.                time-between-eviction-runs-millis="600000"/>
  756.         <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/OracleDataSource" isolation-level="Serializable"/> -->
  757.     </datasource>
  758.  
  759.     <datasource name="localadvantage"
  760.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  761.            field-type-name="advantage"
  762.            check-on-start="true"
  763.            add-missing-on-start="true"
  764.            check-indices-on-start="false"
  765.            use-foreign-keys="false"
  766.            use-foreign-key-indices="true"
  767.            join-style="ansi-no-parenthesis"
  768.            alias-view-columns="false"
  769.            always-use-constraint-keyword="true">
  770.         <read-data reader-name="tenant"/>
  771.         <read-data reader-name="seed"/>
  772.         <read-data reader-name="seed-initial"/>
  773.         <read-data reader-name="demo"/>
  774.         <read-data reader-name="ext"/>
  775.         <read-data reader-name="ext-test"/>
  776.         <read-data reader-name="ext-demo"/>
  777.         <inline-jdbc
  778.                jdbc-driver="com.extendedsystems.jdbc.advantage.ADSDriver"
  779.                jdbc-uri="jdbc:extendedsystems:advantage://localhost:6262;catalog=c:\\advantage\\OFBIZ.ADD;TableType=adt"
  780.                jdbc-username="ADSSYS"
  781.                jdbc-password="adssys"
  782.                isolation-level="ReadCommitted"
  783.                pool-minsize="2"
  784.                pool-maxsize="250"
  785.                time-between-eviction-runs-millis="600000"/>
  786.     </datasource>
  787.    
  788.     <!-- 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 derby-fieldtypes like this: -->
  789.     <!-- 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 -->
  790.     <datasource name="DB2"
  791.            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
  792.            schema-name="OFBIZ"
  793.            field-type-name="derby"
  794.            check-on-start="true"
  795.            add-missing-on-start="true"
  796.            use-pk-constraint-names="false"
  797.            use-indices-unique="false"
  798.            alias-view-columns="false"
  799.            use-order-by-nulls="true"
  800.            offset-style="fetch">
  801.         <read-data reader-name="tenant"/>
  802.         <read-data reader-name="seed"/>
  803.         <read-data reader-name="seed-initial"/>
  804.         <read-data reader-name="demo"/>
  805.         <read-data reader-name="ext"/>
  806.         <read-data reader-name="ext-test"/>
  807.         <read-data reader-name="ext-demo"/>
  808.            
  809.             <!--   There is an open source version of the jdbc driver at sourceforge: http://sourceforge.net/projects/jt400/ -->
  810.         <inline-jdbc
  811.            jdbc-driver="com.ibm.as400.access.AS400JDBCDriver"
  812.            jdbc-uri="jdbc:as400:192.168.1.10;prompt=false;libraries=ofbiz;lazyclose=true;translate binary=true"
  813.            jdbc-username="ofbiz"
  814.            jdbc-password="ofbiz"
  815.            isolation-level="ReadCommitted"
  816.            pool-minsize="2"
  817.            pool-maxsize="250"
  818.            time-between-eviction-runs-millis="600000"/>
  819.     </datasource>
  820. </entity-config>
Add Comment
Please, Sign In to add comment