Opentaps 1.4 to 1.5 Technical Upgrade Notes

From Opentaps Wiki

Jump to: navigation, search

This page describes technical differences between opentaps 1.4 and 1.5. You should read it if you are upgrading or migrating code developed for opentaps 1.4 to opentaps 1.5

Contents


Entity Engine Change

opentaps 1.5 now offers the multi-tenancy features of ofbiz 10.04. This means that you need to configure your database differently in entityengine.xml. Your delegator must now have a main and a tenant datasource:

   <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="localmysql"/>
       <group-map group-name="org.ofbiz.olap" datasource-name="localderbyolap"/>
       <group-map group-name="org.ofbiz.tenant" datasource-name="localmysql_tenant"/>
       <group-map group-name="org.opentaps.analytics" datasource-name="analytics"/>
       <group-map group-name="org.opentaps.testing" datasource-name="testing"/>
   </delegator>

You will then need to define the datasource more than once, even if they both use the same database:

   <datasource name="localmysql_tenant"
           helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
           field-type-name="mysql"
           check-on-start="true"
           add-missing-on-start="true"
           check-pks-on-start="false"
           use-foreign-keys="true"
           join-style="ansi-no-parenthesis"
           alias-view-columns="false"
           drop-fk-use-foreign-key-keyword="true"
           table-type="InnoDB"
           character-set="latin1"
           collate="latin1_general_cs">
       <read-data reader-name="seed"/>
       <read-data reader-name="seed-initial"/>
       <read-data reader-name="demo"/>
       <read-data reader-name="ext"/>
       <inline-jdbc
               jdbc-driver="com.mysql.jdbc.Driver"
               jdbc-uri="jdbc:mysql://127.0.0.1/opentaps_1_5?autoReconnect=true&amp;useOldAliasMetadataBehavior=true"
               jdbc-username="opentaps"
               jdbc-password="opentaps"
               isolation-level="ReadCommitted"
               pool-minsize="2"
               pool-maxsize="250"
               time-between-eviction-runs-millis="600000"/>
   </datasource>

as well as:

   <datasource name="localmysql"
           helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
           field-type-name="mysql"
           check-on-start="true"
           add-missing-on-start="true"
           check-pks-on-start="false"
           use-foreign-keys="true"
           join-style="ansi-no-parenthesis"
           alias-view-columns="false"
           drop-fk-use-foreign-key-keyword="true"
           table-type="InnoDB"
           character-set="latin1"
           collate="latin1_general_cs">
       <read-data reader-name="seed"/>
       <read-data reader-name="seed-initial"/>
       <read-data reader-name="demo"/>
       <read-data reader-name="ext"/>
       <inline-jdbc
               jdbc-driver="com.mysql.jdbc.Driver"
               jdbc-uri="jdbc:mysql://127.0.0.1/opentaps_1_5?autoReconnect=true&useOldAliasMetadataBehavior=true"
               jdbc-username="opentaps"
               jdbc-password="opentaps"
               isolation-level="ReadCommitted"
               pool-minsize="2"
               pool-maxsize="250"
               time-between-eviction-runs-millis="600000"/>
   </datasource>

Web Tier Changes

Controller

If you use minilang event servlets, you must now specify the path explicitly with the component:// notation. Thus,

<event type="simple" path="org/ofbiz/accounting/payment/PaymentMethodEvents.xml" invoke="deletePaymentMethod"/>

must be changed to

<event type="simple" path="component://accounting/script/org/ofbiz/accounting/payment/PaymentMethodEvents.xml" invoke="deletePaymentMethod"/>

Application Changes

All opentaps applications have been moved from hot-deploy to opentaps.



© Open Source Strategies, Inc. Development of this documentation site is sponsored by Open Source Strategies, Inc.
Help support opentaps with a subscription to this documentation site.