Difference between revisions of "Opentaps 1.4 to 1.5 Technical Upgrade Notes"

From Opentaps Wiki
Jump to navigationJump to search
(New page: 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 ===Entity Eng...)
 
(Entity Engine Change)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
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
 
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
 +
 +
__TOC__
  
 
===Entity Engine Change===
 
===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:
+
opentaps 1.5 now offers the multi-tenancy features of ofbiz 10.04.  This means that you need to configure your database differently in <tt>entityengine.xml</tt>.  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">
 
     <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" datasource-name="localmysql"/>
Line 32: Line 34:
 
         <inline-jdbc
 
         <inline-jdbc
 
                 jdbc-driver="com.mysql.jdbc.Driver"
 
                 jdbc-driver="com.mysql.jdbc.Driver"
                 jdbc-uri="jdbc:mysql://127.0.0.1/opentaps_1_5?autoReconnect=true&amp;useOldAliasMetadataBehavior=true"
+
                 jdbc-uri="jdbc:mysql://127.0.0.1/opentaps_1_5?autoReconnect=true&amp;amp;useOldAliasMetadataBehavior=true"
 
                 jdbc-username="opentaps"
 
                 jdbc-username="opentaps"
 
                 jdbc-password="opentaps"
 
                 jdbc-password="opentaps"
Line 77: Line 79:
 
     </datasource>
 
     </datasource>
  
== Web Tier Changes ==
+
=== Web Tier Changes ===
  
=== Controller ===
+
==== Controller ====
  
If you use minilang event servlets, you must now specify the path explicitly with the `component://` notation.  Thus,  
+
If you use minilang event servlets, you must now specify the path explicitly with the <tt>component://</tt> notation.  Thus,  
  
        <event type="simple" path="org/ofbiz/accounting/payment/PaymentMethodEvents.xml" invoke="deletePaymentMethod"/>
+
<event type="simple" path="org/ofbiz/accounting/payment/PaymentMethodEvents.xml" invoke="deletePaymentMethod"/>
  
 
must be changed to
 
must be changed to
 +
<event type="simple" path="component://accounting/script/org/ofbiz/accounting/payment/PaymentMethodEvents.xml" invoke="deletePaymentMethod"/>
 +
 +
== Application Changes ==
  
        <event type="simple" path="component://accounting/script/org/ofbiz/accounting/payment/PaymentMethodEvents.xml" invoke="deletePaymentMethod"/>
+
All opentaps applications have been moved from <tt>hot-deploy</tt> to <tt>opentaps</tt>.

Latest revision as of 16:40, 1 June 2011

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

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.