You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by er...@apache.org on 2012/07/02 13:03:02 UTC

svn commit: r1356181 [3/8] - in /ofbiz/branches/20120329_portletWidget: ./ applications/accounting/ applications/accounting/data/ applications/accounting/script/org/ofbiz/accounting/payment/ applications/accounting/src/org/ofbiz/accounting/payment/ app...

Modified: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/profileblocks/PaymentMethods.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/profileblocks/PaymentMethods.ftl?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/profileblocks/PaymentMethods.ftl (original)
+++ ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/profileblocks/PaymentMethods.ftl Mon Jul  2 11:02:34 2012
@@ -38,7 +38,7 @@ under the License.
     <div class="screenlet-title-bar">
       <ul>
         <li class="h3">${uiLabelMap.PartyPaymentMethodInformation}</li>
-        <#if security.hasEntityPermission("PAY_INFO", "_CREATE", session)>
+        <#if security.hasEntityPermission("PAY_INFO", "_CREATE", session) || security.hasEntityPermission("ACCOUNTING", "_ADMIN", session)>
           <li><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingCreateNewEftAccount}</a></li>
           <li><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingCreateNewGiftCard}</a></li>
           <li><a href="<@o...@ofbizUrl>">${uiLabelMap.AccountingCreateNewCreditCard}</a></li>
@@ -67,7 +67,7 @@ under the License.
                   ${creditCard.lastNameOnCard}
                   <#if creditCard.suffixOnCard?has_content>&nbsp;${creditCard.suffixOnCard}</#if>
                   &nbsp;-&nbsp;
-                  <#if security.hasEntityPermission("PAY_INFO", "_VIEW", session)>
+                  <#if security.hasEntityPermission("PAY_INFO", "_VIEW", session) || security.hasEntityPermission("ACCOUNTING", "_ADMIN", session)>
                     ${creditCard.cardType}
                     <@maskSensitiveNumber cardNumber=creditCard.cardNumber?if_exists/>
                     ${creditCard.expireDate}
@@ -83,7 +83,7 @@ under the License.
                   <#if security.hasEntityPermission("MANUAL", "_PAYMENT", session)>
                     <a href="/accounting/control/manualETx?paymentMethodId=${paymentMethod.paymentMethodId}${externalKeyParam}">${uiLabelMap.PartyManualTx}</a>
                   </#if>
-                  <#if security.hasEntityPermission("PAY_INFO", "_UPDATE", session)>
+                  <#if security.hasEntityPermission("PAY_INFO", "_UPDATE", session) || security.hasEntityPermission("ACCOUNTING", "_ADMIN", session)>
                     <a href="<@o...@ofbizUrl>">${uiLabelMap.CommonUpdate}</a>
                   </#if>
                 <#-- </td> -->
@@ -93,7 +93,7 @@ under the License.
                   ${uiLabelMap.AccountingGiftCard}
                 </td>
                 <td>
-                  <#if security.hasEntityPermission("PAY_INFO", "_VIEW", session)>
+                  <#if security.hasEntityPermission("PAY_INFO", "_VIEW", session) || security.hasEntityPermission("ACCOUNTING", "_ADMIN", session)>
                     ${giftCard.cardNumber?default("N/A")} [${giftCard.pinNumber?default("N/A")}]
                   <#else>
                     <@maskSensitiveNumber cardNumber=giftCard.cardNumber?if_exists/>
@@ -105,7 +105,7 @@ under the License.
                   <#if paymentMethod.thruDate?has_content><b>(${uiLabelMap.PartyContactEffectiveThru}:&nbsp;${paymentMethod.thruDate.toString()}</b></#if>
                 </td>
                 <td class="button-col">
-                  <#if security.hasEntityPermission("PAY_INFO", "_UPDATE", session)>
+                  <#if security.hasEntityPermission("PAY_INFO", "_UPDATE", session) || security.hasEntityPermission("ACCOUNTING", "_ADMIN", session)>
                     <a href="<@o...@ofbizUrl>">${uiLabelMap.CommonUpdate}</a>
                   </#if>
                 <#-- </td> -->
@@ -121,7 +121,7 @@ under the License.
                   <#if paymentMethod.thruDate?has_content><b>(${uiLabelMap.PartyContactEffectiveThru}:&nbsp;${paymentMethod.thruDate.toString()}</#if>
                 </td>
                 <td class="button-col">
-                  <#if security.hasEntityPermission("PAY_INFO", "_UPDATE", session)>
+                  <#if security.hasEntityPermission("PAY_INFO", "_UPDATE", session) || security.hasEntityPermission("ACCOUNTING", "_ADMIN", session)>
                     <a href="<@o...@ofbizUrl>">${uiLabelMap.CommonUpdate}</a>
                   </#if>
                 <#-- </td> -->
@@ -143,7 +143,7 @@ under the License.
                 <td class="button-col">
                   &nbsp;
               </#if>
-              <#if security.hasEntityPermission("PAY_INFO", "_DELETE", session)>
+              <#if security.hasEntityPermission("PAY_INFO", "_DELETE", session) || security.hasEntityPermission("ACCOUNTING", "_ADMIN", session)>
                 <a href="<@o...@ofbizUrl>">${uiLabelMap.CommonExpire}</a>
               <#else>
                 &nbsp;

Modified: ofbiz/branches/20120329_portletWidget/applications/party/widget/partymgr/PartyForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/party/widget/partymgr/PartyForms.xml?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/party/widget/partymgr/PartyForms.xml (original)
+++ ofbiz/branches/20120329_portletWidget/applications/party/widget/partymgr/PartyForms.xml Mon Jul  2 11:02:34 2012
@@ -1015,11 +1015,16 @@ under the License.
         <field name="add" title="${uiLabelMap.CommonAdd}"><submit/></field>
     </form>
     <form name="AddPartyMainRole" type="single" title="${uiLabelMap.PartyAddToMainRole}" target="addrole/viewroles">
+        <actions>
+            <entity-condition entity-name="RoleType" list="parentRoleList">
+                <condition-expr field-name="parentTypeId" operator="equals" from-field="nullField"/>
+                <order-by field-name="description"/>
+            </entity-condition>                            
+        </actions>
         <field name="partyId"><hidden value="${parameters.partyId}"/></field>
         <field name="roleTypeId" event="onChange" action="ajaxUpdateArea('addPartySecondaryRole', 'addsecondaryroles', jQuery('#AddPartyMainRole').serialize());" entry-name="dummy">
             <drop-down allow-empty="false">
                 <entity-options entity-name="RoleType" description="${description}">
-                    <entity-constraint name="parentTypeId" value=""/>
                     <entity-order-by field-name="description"/>
                 </entity-options>
             </drop-down>
@@ -1039,6 +1044,7 @@ under the License.
         <field name="add" title="${uiLabelMap.CommonAdd}"><submit/></field>
     </form>
     <form name="AddRoleType" type="single" title="Add a new roletype" target="createroletype"  list-name="parentRoleList">
+        <field name="partyId"><hidden value="${parameters.partyId}"/></field>
         <field name="roleTypeId" title="${uiLabelMap.PartyRoleTypeId}" required-field="true" entry-name="dummy" position="1"><text/></field>
         <field name="parentTypeId" position="2">
             <drop-down allow-empty="true">

Modified: ofbiz/branches/20120329_portletWidget/applications/product/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/ofbiz-component.xml?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/ofbiz-component.xml (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/ofbiz-component.xml Mon Jul  2 11:02:34 2012
@@ -37,7 +37,10 @@ under the License.
     <entity-resource type="data" reader-name="seed" loader="main" location="data/ProductTypeData.xml"/>
     <entity-resource type="data" reader-name="seed" loader="main" location="data/ProductHelpData.xml"/>
     <entity-resource type="data" reader-name="seed" loader="main" location="data/ShipmentTypeData.xml"/>
-    <entity-resource type="data" reader-name="security" loader="main" location="data/ProductSecurityData.xml"/>
+    <entity-resource type="data" reader-name="seed" loader="main" location="data/ProductSecurityPermissionSeedData.xml"/>
+    <entity-resource type="data" reader-name="demo" loader="main" location="data/ProductSecurityGroupDemoData.xml"/>
+    <entity-resource type="data" reader-name="seed" loader="main" location="data/FacilitySecurityPermissionSeedData.xml"/>
+    <entity-resource type="data" reader-name="demo" loader="main" location="data/FacilitySecurityGroupDemoData.xml"/>
     <entity-resource type="data" reader-name="demo" loader="main" location="data/ProductDemoData.xml"/>
     <entity-resource type="data" reader-name="seed" loader="main" location="data/ApiSchemaDhl.xml"/>
     <entity-resource type="data" reader-name="seed" loader="main" location="data/DimensionTypeData.xml"/>

Propchange: ofbiz/branches/20120329_portletWidget/applications/product/script/org/ofbiz/product/test/InventoryTests.xml
------------------------------------------------------------------------------
  Merged /ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:r1351867-1355999

Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/controller.xml?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/controller.xml (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/controller.xml Mon Jul  2 11:02:34 2012
@@ -63,13 +63,6 @@ under the License.
         <response name="success" type="view" value="FastLoadCache"/>
     </request-map>
 
-    <request-map uri="changeDelegator">
-        <security https="true" auth="true"/>
-        <event type="java" path="org.ofbiz.webapp.event.CoreEvents" invoke="changeDelegator"/>
-        <response name="success" type="view" value="main"/>
-        <response name="error" type="view" value="error"/>
-    </request-map>
-
     <request-map uri="advancedsearch">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="advancedsearch"/>

Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/promo/EditProductPromoCode.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/promo/EditProductPromoCode.ftl?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/promo/EditProductPromoCode.ftl (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/promo/EditProductPromoCode.ftl Mon Jul  2 11:02:34 2012
@@ -23,7 +23,14 @@ under the License.
         </div>
         <div class="screenlet-body">
             <#list productPromoCodeEmails as productPromoCodeEmail>
-                <div><a href="<@o...@ofbizUrl>" class="buttontext">X</a>&nbsp;${productPromoCodeEmail.emailAddress}</div>
+              <div>
+                <form name="deleteProductPromoCodeEmail_${productPromoCodeEmail_index}" method="post" action="<@o...@ofbizUrl>">
+                  <input type="hidden" name="productPromoCodeId" value="${productPromoCodeEmail.productPromoCodeId}"/>                
+                  <input type="hidden" name="emailAddress" value="${productPromoCodeEmail.emailAddress}"/>                
+                  <input type="hidden" name="productPromoId" value="${productPromoId}"/>                
+                  <a href='javascript:document.deleteProductPromoCodeEmail_${productPromoCodeEmail_index}.submit()' class='buttontext'>${uiLabelMap.CommonRemove}</a>&nbsp;${productPromoCodeEmail.emailAddress}
+                </form>
+              </div>                
             </#list>
             <div>
                 <form method="post" action="<@o...@ofbizUrl>" style="margin: 0;">

Modified: ofbiz/branches/20120329_portletWidget/applications/workeffort/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/workeffort/ofbiz-component.xml?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/workeffort/ofbiz-component.xml (original)
+++ ofbiz/branches/20120329_portletWidget/applications/workeffort/ofbiz-component.xml Mon Jul  2 11:02:34 2012
@@ -29,9 +29,10 @@ under the License.
     <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_view.xml"/>
     <entity-resource type="eca" reader-name="main" loader="main" location="entitydef/eecas.xml"/>
     <entity-resource type="data" reader-name="seed" loader="main" location="data/WorkEffortTypeData.xml"/>
-    <entity-resource type="data" reader-name="demo" loader="main" location="data/WorkEffortDemoData.xml"/>
     <entity-resource type="data" reader-name="seed" loader="main" location="data/WorkEffortPortletData.xml"/>
-    <entity-resource type="data" reader-name="security" loader="main" location="data/WorkEffortSecurityData.xml"/>
+    <entity-resource type="data" reader-name="seed" loader="main" location="data/WorkEffortSecurityPermissionSeedData.xml"/>
+    <entity-resource type="data" reader-name="demo" loader="main" location="data/WorkEffortSecurityGroupDemoData.xml"/>
+    <entity-resource type="data" reader-name="demo" loader="main" location="data/WorkEffortDemoData.xml"/>
     <service-resource type="model" loader="main" location="servicedef/services.xml"/>
     <service-resource type="model" loader="main" location="servicedef/services_timesheet.xml"/>
     <service-resource type="model" loader="main" location="servicedef/services_upgrade.xml"/>

Modified: ofbiz/branches/20120329_portletWidget/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml (original)
+++ ofbiz/branches/20120329_portletWidget/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml Mon Jul  2 11:02:34 2012
@@ -39,12 +39,6 @@ under the License.
 
     <!-- Request Mappings -->
 
-    <request-map uri="changeDelegator">
-        <event type="java" path="org.ofbiz.webapp.event.CoreEvents" invoke="changeDelegator"/>
-        <response name="success" type="view" value="main"/>
-        <response name="error" type="view" value="error"/>
-    </request-map>
-
     <request-map uri="view">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="main"/>

Modified: ofbiz/branches/20120329_portletWidget/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/build.xml?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/build.xml (original)
+++ ofbiz/branches/20120329_portletWidget/build.xml Mon Jul  2 11:02:34 2012
@@ -150,13 +150,6 @@ under the License.
         </subant>
     </target>
 
-    <target name="download-selenium"
-          description="Download the selenium server v1.0.3 20.8 MB download">
-        <subant target="install-seleniumxml">
-            <filelist dir="." files="framework/testtools/build.xml"/>
-        </subant>
-    </target>
-
     <target name="tests" depends="ofbiz-init">
         <subant target="tests">
             <filelist dir="." files="framework/build.xml"/>
@@ -863,7 +856,7 @@ under the License.
         <delete file="runtime/tmp/tmpUserLogin.xml"/>
     </target>
     <target name="create-admin-user-login"
-            description="Prompt for a user name, then create a user login with admin privileges and a temporary password equal to 'ofbiz'. After a successful login the user will be prompted for a new password.">
+            description="Prompt for a user name, then create a user login with admin privileges and a temporary password equal to 'ofbiz'. After a successful login the user will be prompted for a new password. Note: this uses load-admin-user-login target">
         <input addproperty="userLoginId" message="Enter user name (log in with the temporary password 'ofbiz'):"/>
         <antcall target="load-admin-user-login"/>
     </target>

Modified: ofbiz/branches/20120329_portletWidget/framework/appserver/src/org/ofbiz/appservers/GenerateContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/appserver/src/org/ofbiz/appservers/GenerateContainer.java?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/appserver/src/org/ofbiz/appservers/GenerateContainer.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/appserver/src/org/ofbiz/appservers/GenerateContainer.java Mon Jul  2 11:02:34 2012
@@ -71,11 +71,13 @@ public class GenerateContainer implement
 
     private boolean isGeronimo = false;
     private String geronimoHome = null;
+    private String name;
 
     /**
      * @see org.ofbiz.base.container.Container#init(java.lang.String[], java.lang.String)
      */
-    public void init(String[] args, String configFile) {
+    public void init(String[] args, String name, String configFile) {
+        this.name = name;
         ofbizHome = System.getProperty("ofbiz.home");
         this.configFile = configFile;
         this.args = args;
@@ -94,7 +96,6 @@ public class GenerateContainer implement
      */
     public boolean start() throws ContainerException {
         generateFiles();
-        System.exit(1);
         return true;
     }
 
@@ -107,6 +108,10 @@ public class GenerateContainer implement
     public void stop() throws ContainerException {
     }
 
+    public String getName() {
+        return name;
+    }
+
     private void generateFiles() throws ContainerException {
         if (isGeronimo) {
             if (geronimoHome == null) {

Modified: ofbiz/branches/20120329_portletWidget/framework/base/config/both-containers.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/base/config/both-containers.xml?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/base/config/both-containers.xml (original)
+++ ofbiz/branches/20120329_portletWidget/framework/base/config/both-containers.xml Mon Jul  2 11:02:34 2012
@@ -20,18 +20,14 @@ under the License.
 
 <ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-containers.xsd">
+    <loader name="main"/>
+    <loader name="pos"/>
     <!-- load the ofbiz component container (always first) -->
     <container name="component-container" class="org.ofbiz.base.container.ComponentContainer"/>
 
     <!-- load the cached classloader container (always second) -->
     <container name="classloader-container" class="org.ofbiz.base.container.ClassLoaderContainer"/>
 
-    <!-- load JNDI/JOTM; this is no longer needed, leaving this in for now just in case someone wants to drop in JOTM from the specialized directory
-    <container name="jotm-container" class="org.ofbiz.jotm.container.JotmContainer">
-        <property name="jndi-config" value="iiop.properties"/>
-    </container>
-    -->
-
     <!-- load the naming (JNDI) server -->
     <container name="naming-container" class="org.ofbiz.base.container.NamingServiceContainer">
         <property name="host" value="0.0.0.0"/>
@@ -52,225 +48,4 @@ under the License.
         <property name="ssl-keystore-alias" value="rmissl"/>
         <property name="ssl-client-auth" value="false"/>
     </container>
-
-    <!-- JavaMail Listener Container - Triggers MCA Rules -->
-    <!-- if delete-mail is set to true, will delete messages after fetching them. otherwise, will try to mark them as seen
-        mail.store.protocol supports both imap and pop3, but pop3 will not be able to mark messages as seen, so you would need to delete them
-        Sounds like mail.store.protocol value should be "imaps" for GMail inbound emails to work.
-        Not tested found here https://sourceforge.net/forum/message.php?msg_id=5879468 -->
-    <!-- To use the mail listerner just uncomment and go...
-    <container name="javamail-container" class="org.ofbiz.service.mail.JavaMailContainer">
-        <property name="delegator-name" value="default"/>
-        <property name="dispatcher-name" value="JavaMailDispatcher"/>
-        <property name="run-as-user" value="system"/>
-        <property name="poll-delay" value="300000"/>
-        <property name="delete-mail" value="false"/>
-        <property name="maxSize" value="100000"/>
-        <property name="default-listener" value="store-listener">
-        <property name="mail.store.protocol" value="imap"/>
-        <property name="mail.host" value="[host]"/>
-        <property name="mail.user" value="[user]"/>
-        <property name="mail.pass" value="[pass]"/>
-        <property name="mail.debug" value="false"/>
-        </property>
-    </container>
-    -->
-
-    <!-- load catalina (tomcat) and all web applications -->
-    <container name="catalina-container" class="org.ofbiz.catalina.container.CatalinaContainer">
-        <!-- static configuration for tomcat -->
-        <property name="delegator-name" value="default"/>
-        <property name="use-naming" value="false"/>
-        <property name="debug" value="0"/>
-        <property name="catalina-runtime-home" value="runtime/catalina"/>
-        <property name="apps-context-reloadable" value="false"/>
-        <property name="apps-cross-context" value="false"/>
-        <property name="apps-distributable" value="false"/><!-- you must also set all the webapps you want distributable, by adding <distributable/> in their web.xml file -->
-        <!-- one or more tomcat engines (servers); map to this + host -->
-        <property name="default-server" value="engine">
-            <property name="default-host" value="0.0.0.0"/>
-            <property name="jvm-route" value="jvm1"/>
-            <property name="access-log-pattern">
-                <property-value>%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"</property-value>
-            </property>
-            <property name="access-log-resolve" value="true"/>
-            <property name="access-log-rotate" value="true"/>
-            <property name="access-log-prefix" value="access_log."/>
-            <property name="access-log-dir" value="runtime/logs"/>
-            <property name="enable-request-dump" value="false"/>
-            <!-- uncomment for cluster support
-            <property name="default-server-cluster" value="cluster">
-                <property name="rep-valve-filter">
-                <property-value>.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;.*\.png;.*\.css;.*\.ico;.*\.htc;</property-value>
-                </property>
-                <property name="manager-class" value="org.apache.catalina.ha.session.DeltaManager"/>
-                <property name="debug" value="5"/>
-                <property name="replication-mode" value="org.apache.catalina.tribes.transport.bio.PooledMultiSender"/>
-                <property name="tcp-listen-host" value="auto"/>
-                <property name="tcp-listen-port" value="4001"/>
-                <property name="tcp-sector-timeout" value="100"/>
-                <property name="tcp-thread-count" value="6"/>
-                <property name="mcast-bind-addr" value="192.168.2.1"/>
-                <property name="mcast-addr" value="228.0.0.4"/>
-                <property name="mcast-port" value="45564"/>
-                <property name="mcast-freq" value="500"/>
-                <property name="mcast-drop-time" value="3000"/>
-            </property>
-            -->
-            <!-- <property name="ssl-accelerator-port" value="8443"/> -->
-            <property name="enable-cross-subdomain-sessions" value="false"/>
-        </property>
-        <!-- all connectors support type, host, port, enable-lookups -->
-        <property name="ajp-connector" value="connector">
-            <!-- see http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/ajp.html for reference -->
-            <property name="allowTrace" value="false"/>
-            <property name="emptySessionPath" value="false"/>
-            <property name="enableLookups" value="false"/>
-            <property name="maxPostSize" value="2097152"/>
-            <property name="protocol" value="AJP/1.3"/>
-            <property name="proxyName" value=""/>
-            <property name="proxyPort" value=""/>
-            <property name="redirectPort" value=""/>
-            <property name="scheme" value="http"/>
-            <property name="secure" value="false"/>
-            <property name="URIEncoding" value="UTF-8"/>
-            <property name="useBodyEncodingForURI" value="false"/>
-            <property name="xpoweredBy" value="true"/>
-            <!-- AJP/13 connector attributes -->
-            <property name="address" value="0.0.0.0"/>
-            <property name="backlog" value="10"/>
-            <property name="maxSpareThreads" value="50"/>
-            <property name="maxThreads" value="200"/>
-            <property name="minSpareThreads" value="4"/>
-            <property name="port" value="8009"/>
-            <property name="tcpNoDelay" value="true"/>
-            <property name="soTimeout" value="60000"/>
-            <property name="tomcatAuthentication" value="true"/>
-        </property>
-        <property name="http-connector" value="connector">
-            <!-- see http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html for reference -->
-            <property name="allowTrace" value="false"/>
-            <property name="emptySessionPath" value="false"/>
-            <property name="enableLookups" value="false"/>
-            <property name="maxPostSize" value="2097152"/>
-            <property name="protocol" value="HTTP/1.1"/>
-            <property name="proxyName" value=""/>
-            <property name="proxyPort" value=""/>
-            <property name="redirectPort" value=""/>
-            <property name="scheme" value="http"/>
-            <property name="secure" value="false"/>
-            <property name="URIEncoding" value="UTF-8"/>
-            <property name="useBodyEncodingForURI" value="false"/>
-            <property name="xpoweredBy" value="true"/>
-            <!-- HTTP connector attributes -->
-            <property name="acceptCount" value="10"/>
-            <property name="address" value="0.0.0.0"/>
-            <property name="bufferSize" value="2048"/>
-            <property name="compressableMimeType" value="text/html,text/xml,text/plain"/>
-            <property name="compression" value="on"/>
-            <property name="connectionLinger" value="-1"/>
-            <property name="connectionTimeout" value="60000"/>
-            <property name="disableUploadTimeout" value="false"/>
-            <property name="maxHttpHeaderSize" value="4096"/>
-            <property name="maxKeepAliveRequests" value="100"/>
-            <property name="maxSpareThreads" value="50"/>
-            <property name="maxThreads" value="100"/>
-            <property name="minSpareThreads" value="4"/>
-            <property name="noCompressionUserAgents" value=""/>
-            <property name="port" value="8080"/>
-            <property name="restrictedUserAgents" value=""/>
-            <property name="server" value=""/>
-            <property name="socketBuffer" value="9000"/>
-            <property name="strategy" value="lf"/>
-            <property name="tcpNoDelay" value="true"/>
-            <property name="threadPriority" value="java.lang.Thread#NORM_PRIORITY"/>
-        </property>
-        <property name="https-connector" value="connector">
-            <!-- see http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html for reference -->
-            <property name="allowTrace" value="false"/>
-            <property name="emptySessionPath" value="false"/>
-            <property name="enableLookups" value="false"/>
-            <property name="maxPostSize" value="2097152"/>
-            <property name="protocol" value="HTTP/1.1"/>
-            <property name="proxyName" value=""/>
-            <property name="proxyPort" value=""/>
-            <property name="redirectPort" value=""/>
-            <property name="scheme" value="https"/>
-            <property name="secure" value="true"/>
-            <property name="URIEncoding" value="UTF-8"/>
-            <property name="useBodyEncodingForURI" value="false"/>
-            <property name="xpoweredBy" value="true"/>
-            <!-- HTTP connector attributes -->
-            <property name="acceptCount" value="10"/>
-            <property name="address" value="0.0.0.0"/>
-            <property name="bufferSize" value="2048"/>
-            <property name="compressableMimeType" value="text/html,text/xml,text/plain"/>
-            <property name="compression" value="on"/>
-            <property name="connectionLinger" value="-1"/>
-            <property name="connectionTimeout" value="60000"/>
-            <property name="disableUploadTimeout" value="false"/>
-            <property name="maxHttpHeaderSize" value="4096"/>
-            <property name="maxKeepAliveRequests" value="100"/>
-            <property name="maxSpareThreads" value="50"/>
-            <property name="maxThreads" value="100"/>
-            <property name="minSpareThreads" value="4"/>
-            <property name="noCompressionUserAgents" value=""/>
-            <property name="port" value="8443"/>
-            <property name="restrictedUserAgents" value=""/>
-            <property name="server" value=""/>
-            <property name="socketBuffer" value="9000"/>
-            <property name="strategy" value="lf"/>
-            <property name="tcpNoDelay" value="true"/>
-            <property name="threadPriority" value="java.lang.Thread#NORM_PRIORITY"/>
-            <!-- SSL connector attributes -->
-            <property name="sSLImplementation" value="org.ofbiz.catalina.container.SSLImpl"/>
-            <property name="algorithm" value="SunX509"/>
-            <!-- the clientAuth to "want" in order to receive certs from the client;
-                note that this isn't set this way by default because with certain browsers
-                (like Safari) it breaks access via HTTPS, so until that problem is fixed
-                the default will be false -->
-            <property name="clientAuth" value="false"/>
-            <property name="keystoreFile" value="framework/base/config/ofbizssl.jks"/>
-            <property name="keystorePass" value="changeit"/>
-            <property name="keystoreType" value="JKS"/>
-            <property name="sslProtocol" value="TLS"/>
-            <property name="ciphers" value=""/>
-        </property>
-    </container>
-
-
-    <!-- load the JPOS devices -->
-    <container name="jpos.device-container" class="org.ofbiz.pos.container.JposDeviceContainer">
-        <property name="CashDrawer.1" value="NullCashDrawer"/>
-        <property name="Receipt" value="NullReceipt"/>
-        <!--property name="Receipt" value="TM-T88III"/-->
-        <!--property name="Receipt" value="StarTSP600"/-->
-        <property name="Keyboard" value="GenericKeyboard"/>
-        <property name="Scanner" value="GenericScanner"/>
-        <property name="Msr" value="TestMsr"/>
-        <property name="PinPad" value="[NOT IMPLEMENTED]"/>
-        <property name="Journal" value="[NOT IMPLEMENTED]"/>
-        <property name="LineDisplay" value="[NOT IMPLEMENTED]"/>
-        <property name="CheckScanner" value="[NOT IMPLEMENTED]"/>
-        <property name="SignatureCapture" value="[NOT IMPLEMENTED]"/>
-    </container>
-
-    <!-- load the POS GUI -->
-    <container name="pos-container" class="org.ofbiz.pos.container.PosContainer">
-        <property name="startup-directory" value="specialpurpose/pos/config/"/>
-        <property name="startup-file" value="xpos.properties"/>
-        <property name="class-package-name " value="net.xoetrope.swing"/>
-        <property name="dispatcher-name" value="POSDispatcher"/>
-        <property name="delegator-name" value="default"/>
-        <property name="xui-session-id" value="pos-1"/>
-        <property name="facility-id" value="MyRetailStore"/>
-        <property name="look-and-feel" value="com.jgoodies.looks.plastic.PlasticLookAndFeel"/>
-    </container>
-
-    <!-- load BeanShell remote telnet server -->
-    <container name="beanshell-container" class="org.ofbiz.base.container.BeanShellContainer">
-        <!-- the port below and port-1 will be opened by beanshell -->
-        <property name="telnet-port" value="9990"/>
-        <property name="app-name" value="OFBiz"/>
-    </container>
 </ofbiz-containers>

Modified: ofbiz/branches/20120329_portletWidget/framework/base/config/install-containers.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/base/config/install-containers.xml?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/base/config/install-containers.xml (original)
+++ ofbiz/branches/20120329_portletWidget/framework/base/config/install-containers.xml Mon Jul  2 11:02:34 2012
@@ -20,16 +20,12 @@ under the License.
 
 <ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-containers.xsd">
+    <loader name="install"/>
     <!-- load the ofbiz component container (always first) -->
     <container name="component-container" class="org.ofbiz.base.container.ComponentContainer"/>
 
     <!-- load the cached classloader container (always second) -->
     <container name="classloader-container" class="org.ofbiz.base.container.ClassLoaderContainer"/>
 
-    <!-- load the data load container, runs the entity data load stuff -->
-    <container name="dataload-container" class="org.ofbiz.entityext.data.EntityDataLoadContainer">
-        <property name="delegator-name" value="default"/>
-        <property name="entity-group-name" value="org.ofbiz"/>
-    </container>
 </ofbiz-containers>
 

Modified: ofbiz/branches/20120329_portletWidget/framework/base/config/limited-containers.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/base/config/limited-containers.xml?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/base/config/limited-containers.xml (original)
+++ ofbiz/branches/20120329_portletWidget/framework/base/config/limited-containers.xml Mon Jul  2 11:02:34 2012
@@ -41,11 +41,4 @@ under the License.
         <property name="ssl-keystore-alias" value="rmissl"/>
         <property name="ssl-client-auth" value="true"/>
     </container>
-
-    <!-- load BeanShell remote telnet server -->
-    <container name="beanshell-container" class="org.ofbiz.base.container.BeanShellContainer">
-        <!-- the port below and port-1 will be opened by beanshell -->
-        <property name="telnet-port" value="9990"/>
-        <property name="app-name" value="OFBiz"/>
-    </container>
 </ofbiz-containers>

Modified: ofbiz/branches/20120329_portletWidget/framework/base/config/ofbiz-containers.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/base/config/ofbiz-containers.xml?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/base/config/ofbiz-containers.xml (original)
+++ ofbiz/branches/20120329_portletWidget/framework/base/config/ofbiz-containers.xml Mon Jul  2 11:02:34 2012
@@ -20,6 +20,7 @@ under the License.
 
 <ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-containers.xsd">
+    <loader name="main"/>
     <!-- load the ofbiz component container (always first) -->
     <container name="component-container" class="org.ofbiz.base.container.ComponentContainer"/>
 
@@ -74,177 +75,6 @@ under the License.
     </container>
     -->
 
-    <!-- Load embedded Jackrabbit content repository. Since this container depends
-         upon JNDI, it must be started after the naming-container container.-->
-    <container name="jcr-container" class="org.ofbiz.jcr.loader.JCRContainer">
-        <property name="configFilePath" value="framework/jcr/config/jcr-config.xml"/>
-        <property name="removeOnShutdown" value="false"/>
-    </container>
-
-    <!-- load catalina (tomcat) and all web applications -->
-    <container name="catalina-container" class="org.ofbiz.catalina.container.CatalinaContainer">
-        <!-- static configuration for tomcat -->
-        <property name="delegator-name" value="default"/>
-        <property name="use-naming" value="false"/>
-        <property name="debug" value="0"/>
-        <property name="catalina-runtime-home" value="runtime/catalina"/>
-        <property name="apps-context-reloadable" value="false"/>
-        <property name="apps-cross-context" value="false"/>
-        <property name="apps-distributable" value="false"/><!-- you must also set all the webapps you want distributable, by adding <distributable/> in their web.xml file -->
-        <!-- one or more tomcat engines (servers); map to this + host -->
-        <property name="default-server" value="engine">
-            <property name="default-host" value="0.0.0.0"/>
-            <property name="jvm-route" value="jvm1"/>
-            <property name="access-log-pattern">
-                <property-value>%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"</property-value>
-            </property>
-            <property name="access-log-resolve" value="true"/>
-            <property name="access-log-rotate" value="true"/>
-            <property name="access-log-prefix" value="access_log."/>
-            <property name="access-log-dir" value="runtime/logs"/>
-            <!-- uncomment for cluster support
-            <property name="default-server-cluster" value="cluster">
-                <property name="rep-valve-filter">
-                <property-value>.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;.*\.png;.*\.css;.*\.ico;.*\.htc;</property-value>
-                </property>
-                <property name="manager-class" value="org.apache.catalina.ha.session.DeltaManager"/>
-                <property name="debug" value="5"/>
-                <property name="replication-mode" value="org.apache.catalina.tribes.transport.bio.PooledMultiSender"/>
-                <property name="tcp-listen-host" value="auto"/>
-                <property name="tcp-listen-port" value="4001"/>
-                <property name="tcp-sector-timeout" value="100"/>
-                <property name="tcp-thread-count" value="6"/>
-                <property name="mcast-bind-addr" value="192.168.2.1"/>
-                <property name="mcast-addr" value="228.0.0.4"/>
-                <property name="mcast-port" value="45564"/>
-                <property name="mcast-freq" value="500"/>
-                <property name="mcast-drop-time" value="3000"/>
-            </property>
-            -->
-            <!-- <property name="ssl-accelerator-port" value="8443"/> -->
-            <property name="enable-cross-subdomain-sessions" value="false"/>
-        </property>
-        <!-- all connectors support type, host, port, enable-lookups -->
-        <property name="ajp-connector" value="connector">
-            <!-- see http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/ajp.html for reference -->
-            <property name="allowTrace" value="false"/>
-            <property name="emptySessionPath" value="false"/>
-            <property name="enableLookups" value="false"/>
-            <property name="maxPostSize" value="2097152"/>
-            <property name="protocol" value="AJP/1.3"/>
-            <property name="proxyName" value=""/>
-            <property name="proxyPort" value=""/>
-            <property name="redirectPort" value=""/>
-            <property name="scheme" value="http"/>
-            <property name="secure" value="false"/>
-            <property name="URIEncoding" value="UTF-8"/>
-            <property name="useBodyEncodingForURI" value="false"/>
-            <property name="xpoweredBy" value="true"/>
-            <!-- AJP/13 connector attributes -->
-            <property name="address" value="0.0.0.0"/>
-            <property name="backlog" value="10"/>
-            <property name="maxSpareThreads" value="50"/>
-            <property name="maxThreads" value="200"/>
-            <property name="minSpareThreads" value="4"/>
-            <property name="port" value="8009"/>
-            <property name="tcpNoDelay" value="true"/>
-            <property name="soTimeout" value="60000"/>
-            <property name="tomcatAuthentication" value="true"/>
-        </property>
-        <property name="http-connector" value="connector">
-            <!-- see http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html for reference -->
-            <property name="allowTrace" value="false"/>
-            <property name="emptySessionPath" value="false"/>
-            <property name="enableLookups" value="false"/>
-            <property name="maxPostSize" value="2097152"/>
-            <property name="protocol" value="HTTP/1.1"/>
-            <property name="proxyName" value=""/>
-            <property name="proxyPort" value=""/>
-            <property name="redirectPort" value=""/>
-            <property name="scheme" value="http"/>
-            <property name="secure" value="false"/>
-            <property name="URIEncoding" value="UTF-8"/>
-            <property name="useBodyEncodingForURI" value="false"/>
-            <property name="xpoweredBy" value="true"/>
-            <!-- HTTP connector attributes -->
-            <property name="acceptCount" value="10"/>
-            <property name="address" value="0.0.0.0"/>
-            <property name="bufferSize" value="2048"/>
-            <property name="compression" value="on"/>
-            <property name="compressableMimeType" value="text/html,text/xml,text/plain,text/javascript,text/css"/>
-            <property name="noCompressionUserAgents" value=""/>
-            <property name="connectionLinger" value="-1"/>
-            <property name="connectionTimeout" value="60000"/>
-            <property name="disableUploadTimeout" value="false"/>
-            <property name="maxHttpHeaderSize" value="4096"/>
-            <property name="maxKeepAliveRequests" value="100"/>
-            <property name="maxSpareThreads" value="50"/>
-            <property name="maxThreads" value="100"/>
-            <property name="minSpareThreads" value="4"/>
-            <property name="port" value="8080"/>
-            <property name="restrictedUserAgents" value=""/>
-            <property name="server" value=""/>
-            <property name="socketBuffer" value="9000"/>
-            <property name="strategy" value="lf"/>
-            <property name="tcpNoDelay" value="true"/>
-            <property name="threadPriority" value="java.lang.Thread#NORM_PRIORITY"/>
-        </property>
-        <property name="https-connector" value="connector">
-            <!-- see http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html for reference -->
-            <property name="allowTrace" value="false"/>
-            <property name="emptySessionPath" value="false"/>
-            <property name="enableLookups" value="false"/>
-            <property name="maxPostSize" value="2097152"/>
-            <property name="protocol" value="HTTP/1.1"/>
-            <property name="proxyName" value=""/>
-            <property name="proxyPort" value=""/>
-            <property name="redirectPort" value=""/>
-            <property name="scheme" value="https"/>
-            <property name="secure" value="true"/>
-            <property name="URIEncoding" value="UTF-8"/>
-            <property name="useBodyEncodingForURI" value="false"/>
-            <property name="xpoweredBy" value="true"/>
-            <!-- HTTP connector attributes -->
-            <property name="acceptCount" value="10"/>
-            <property name="address" value="0.0.0.0"/>
-            <property name="bufferSize" value="2048"/>
-            <property name="compression" value="on"/>
-            <property name="compressableMimeType" value="text/html,text/xml,text/plain,text/javascript,text/css"/>
-            <property name="noCompressionUserAgents" value=""/>
-            <property name="connectionLinger" value="-1"/>
-            <property name="connectionTimeout" value="60000"/>
-            <property name="disableUploadTimeout" value="false"/>
-            <property name="maxHttpHeaderSize" value="4096"/>
-            <property name="maxKeepAliveRequests" value="100"/>
-            <property name="maxSpareThreads" value="50"/>
-            <property name="maxThreads" value="100"/>
-            <property name="minSpareThreads" value="4"/>
-            <property name="port" value="8443"/>
-            <property name="restrictedUserAgents" value=""/>
-            <property name="server" value=""/>
-            <property name="socketBuffer" value="9000"/>
-            <property name="strategy" value="lf"/>
-            <property name="tcpNoDelay" value="true"/>
-            <property name="threadPriority" value="java.lang.Thread#NORM_PRIORITY"/>
-            <!-- SSL connector attributes -->
-            <property name="sSLImplementation" value="org.ofbiz.catalina.container.SSLImpl"/>
-            <property name="algorithm" value="SunX509"/>
-            <!-- the clientAuth to "want" in order to receive certs from the client;
-                note that this isn't set this way by default because with certain browsers
-                (like Safari) it breaks access via HTTPS, so until that problem is fixed
-                the default will be false -->
-            <property name="clientAuth" value="false"/>
-            <property name="keystoreFile" value="framework/base/config/ofbizssl.jks"/>
-            <property name="keystorePass" value="changeit"/>
-            <property name="keystoreType" value="JKS"/>
-            <property name="sslProtocol" value="TLS"/>
-            <property name="ciphers" value=""/>
-        </property>
-    </container>
-
-    <!-- load the BIRT container -->
-    <container name="birt-container" class="org.ofbiz.birt.container.BirtContainer"/>
-
     <!-- load BeanShell remote telnet server -->
     <!-- Commented out by default for security reasons -->
     <!-- the port below and port-1 will be opened by Beanshell -->

Modified: ofbiz/branches/20120329_portletWidget/framework/base/config/pos-containers.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/base/config/pos-containers.xml?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/base/config/pos-containers.xml (original)
+++ ofbiz/branches/20120329_portletWidget/framework/base/config/pos-containers.xml Mon Jul  2 11:02:34 2012
@@ -20,38 +20,11 @@ under the License.
 
 <ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-containers.xsd">
+    <loader name="pos"/>
     <!-- load the ofbiz component container (always first) -->
     <container name="component-container" class="org.ofbiz.base.container.ComponentContainer"/>
 
     <!-- load the cached classloader container (always second) -->
     <container name="classloader-container" class="org.ofbiz.base.container.ClassLoaderContainer"/>
 
-    <!-- load the JPOS devices -->
-    <container name="jpos.device-container" class="org.ofbiz.pos.container.JposDeviceContainer">
-        <property name="CashDrawer.1" value="NullCashDrawer"/>
-        <property name="Receipt" value="NullReceipt"/>
-        <!--property name="Receipt" value="TM-T88III"/-->
-        <!--property name="Receipt" value="StarTSP600"/-->
-        <property name="Keyboard" value="GenericKeyboard"/>
-        <property name="Scanner" value="GenericScanner"/>
-        <property name="Msr" value="TestMsr"/>
-        <property name="PinPad" value="[NOT IMPLEMENTED]"/>
-        <property name="Journal" value="[NOT IMPLEMENTED]"/>
-        <property name="LineDisplay" value="[NOT IMPLEMENTED]"/>
-        <property name="CheckScanner" value="[NOT IMPLEMENTED]"/>
-        <property name="SignatureCapture" value="[NOT IMPLEMENTED]"/>
-    </container>
-
-    <!-- load the POS GUI -->
-    <container name="pos-container" class="org.ofbiz.pos.container.PosContainer">
-        <property name="startup-directory" value="specialpurpose/pos/config/"/>
-        <property name="startup-file" value="xpos.properties"/>
-        <property name="class-package-name " value="net.xoetrope.swing"/>
-        <property name="dispatcher-name" value="POSDispatcher"/>
-        <property name="delegator-name" value="default"/>
-        <property name="xui-session-id" value="pos-1"/>
-        <property name="facility-id" value="MyRetailStore"/>
-        <property name="look-and-feel" value="com.jgoodies.looks.plastic.PlasticLookAndFeel"/>
-    </container>
-
 </ofbiz-containers>

Modified: ofbiz/branches/20120329_portletWidget/framework/base/config/rmi-containers.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/base/config/rmi-containers.xml?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/base/config/rmi-containers.xml (original)
+++ ofbiz/branches/20120329_portletWidget/framework/base/config/rmi-containers.xml Mon Jul  2 11:02:34 2012
@@ -46,27 +46,4 @@ under the License.
         <property name="ssl-client-auth" value="true"/>
     </container>
 
-    <!-- JavaMail Listener Container - Triggers MCA Rules -->
-    <!-- if delete-mail is set to true, will delete messages after fetching them. otherwise, will try to mark them as seen
-        mail.store.protocol supports both imap and pop3, but pop3 will not be able to mark messages as seen, so you would need to delete them
-        Sounds like mail.store.protocol value should be "imaps" for GMail inbound emails to work.
-        Not tested found here https://sourceforge.net/forum/message.php?msg_id=5879468 -->
-    <!-- To use the mail listerner just uncomment and go...
-        <container name="javamail-container" class="org.ofbiz.service.mail.JavaMailContainer">
-        <property name="delegator-name" value="default"/>
-        <property name="dispatcher-name" value="JavaMailDispatcher"/>
-        <property name="run-as-user" value="system"/>
-        <property name="poll-delay" value="300000"/>
-        <property name="delete-mail" value="false"/>
-        <property name="maxSize" value="100000"/>
-        <property name="default-listener" value="store-listener">
-        <property name="mail.store.protocol" value="IMAP"/>
-        <property name="mail.host" value="[host]"/>
-        <property name="mail.user" value="[user]"/>
-        <property name="mail.pass" value="[pass]"/>
-        <property name="mail.debug" value="false"/>
-        </property>
-        </container>
-    -->
-
 </ofbiz-containers>

Modified: ofbiz/branches/20120329_portletWidget/framework/base/config/test-containers.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/base/config/test-containers.xml?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/base/config/test-containers.xml (original)
+++ ofbiz/branches/20120329_portletWidget/framework/base/config/test-containers.xml Mon Jul  2 11:02:34 2012
@@ -20,6 +20,7 @@ under the License.
 
 <ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-containers.xsd">
+    <loader name="test"/>
     <!-- load the ofbiz component container (always first) -->
     <container name="component-container" class="org.ofbiz.base.container.ComponentContainer">
         <property name="ofbiz.instrumenterClassName" value="org.ofbiz.base.config.CoberturaInstrumenter"/>
@@ -49,170 +50,4 @@ under the License.
         <property name="ssl-keystore-alias" value="rmissl"/>
         <property name="ssl-client-auth" value="true"/>
     </container>
-
-    <!-- Load embedded Jackrabbit content repository. Since this container depends
-    upon JNDI, it must be started after the naming-container container.-->
-    <container name="jcr-container" class="org.ofbiz.jcr.loader.JCRContainer">
-        <property name="configFilePath" value="framework/jcr/config/jcr-test-config.xml"/>
-        <property name="removeRepositoryOnShutdown" value="true"/>
-    </container>
-
-    <!-- load catalina (tomcat) and all web applications -->
-    <container name="catalina-container" class="org.ofbiz.catalina.container.CatalinaContainer">
-        <!-- static configuration for tomcat -->
-        <property name="delegator-name" value="default"/>
-        <property name="use-naming" value="false"/>
-        <property name="debug" value="0"/>
-        <property name="catalina-runtime-home" value="runtime/catalina"/>
-        <property name="apps-context-reloadable" value="false"/>
-        <property name="apps-cross-context" value="false"/>
-        <property name="apps-distributable" value="false"/><!-- you must also set all the webapps you want distributable, by adding <distributable/> in their web.xml file -->
-        <!-- one or more tomcat engines (servers); map to this + host -->
-        <property name="default-server" value="engine">
-            <property name="default-host" value="0.0.0.0"/>
-            <property name="jvm-route" value="jvm1"/>
-            <property name="access-log-pattern">
-                <property-value>%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"</property-value>
-            </property>
-            <property name="access-log-resolve" value="true"/>
-            <property name="access-log-rotate" value="true"/>
-            <property name="access-log-prefix" value="access_log."/>
-            <property name="access-log-dir" value="runtime/logs"/>
-            <property name="enable-request-dump" value="false"/>
-            <!-- uncomment for cluster support
-            <property name="default-server-cluster" value="cluster">
-                <property name="rep-valve-filter">
-                <property-value>.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;.*\.png;.*\.css;.*\.ico;.*\.htc;</property-value>
-                </property>
-                <property name="manager-class" value="org.apache.catalina.cluster.session.DeltaManager"/>
-                <property name="debug" value="5"/>
-                <property name="replication-mode" value="org.apache.catalina.tribes.transport.bio.PooledMultiSender"/>
-                <property name="tcp-listen-host" value="auto"/>
-                <property name="tcp-listen-port" value="4001"/>
-                <property name="tcp-sector-timeout" value="100"/>
-                <property name="tcp-thread-count" value="6"/>
-                <property name="mcast-bind-addr" value="192.168.2.1"/>
-                <property name="mcast-addr" value="224.0.0.1"/>
-                <property name="mcast-port" value="45564"/>
-                <property name="mcast-freq" value="500"/>
-                <property name="mcast-drop-time" value="3000"/>
-            </property>
-            -->
-            <!-- <property name="ssl-accelerator-port" value="8443"/> -->
-        </property>
-        <!-- all connectors support type, host, port, enable-lookups -->
-        <property name="ajp-connector" value="connector">
-            <!-- see http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/ajp.html for reference -->
-            <property name="allowTrace" value="false"/>
-            <property name="emptySessionPath" value="false"/>
-            <property name="enableLookups" value="false"/>
-            <property name="maxPostSize" value="2097152"/>
-            <property name="protocol" value="AJP/1.3"/>
-            <property name="proxyName" value=""/>
-            <property name="proxyPort" value=""/>
-            <property name="redirectPort" value=""/>
-            <property name="scheme" value="http"/>
-            <property name="secure" value="false"/>
-            <property name="URIEncoding" value="UTF-8"/>
-            <property name="useBodyEncodingForURI" value="false"/>
-            <property name="xpoweredBy" value="true"/>
-            <!-- AJP/13 connector attributes -->
-            <property name="address" value="0.0.0.0"/>
-            <property name="backlog" value="10"/>
-            <property name="maxSpareThreads" value="50"/>
-            <property name="maxThreads" value="200"/>
-            <property name="minSpareThreads" value="4"/>
-            <property name="port" value="8010"/>
-            <property name="tcpNoDelay" value="true"/>
-            <property name="soTimeout" value="60000"/>
-            <property name="tomcatAuthentication" value="true"/>
-        </property>
-        <property name="http-connector" value="connector">
-            <!-- see http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html for reference -->
-            <property name="allowTrace" value="false"/>
-            <property name="emptySessionPath" value="false"/>
-            <property name="enableLookups" value="false"/>
-            <property name="maxPostSize" value="2097152"/>
-            <property name="protocol" value="HTTP/1.1"/>
-            <property name="proxyName" value=""/>
-            <property name="proxyPort" value=""/>
-            <property name="redirectPort" value=""/>
-            <property name="scheme" value="http"/>
-            <property name="secure" value="false"/>
-            <property name="URIEncoding" value="UTF-8"/>
-            <property name="useBodyEncodingForURI" value="false"/>
-            <property name="xpoweredBy" value="true"/>
-            <!-- HTTP connector attributes -->
-            <property name="acceptCount" value="10"/>
-            <property name="address" value="0.0.0.0"/>
-            <property name="bufferSize" value="2048"/>
-            <property name="compressableMimeType" value="text/html,text/xml,text/plain"/>
-            <property name="compression" value="on"/>
-            <property name="connectionLinger" value="-1"/>
-            <property name="connectionTimeout" value="60000"/>
-            <property name="disableUploadTimeout" value="false"/>
-            <property name="maxHttpHeaderSize" value="4096"/>
-            <property name="maxKeepAliveRequests" value="100"/>
-            <property name="maxSpareThreads" value="50"/>
-            <property name="maxThreads" value="100"/>
-            <property name="minSpareThreads" value="4"/>
-            <property name="noCompressionUserAgents" value=""/>
-            <property name="port" value="8081"/>
-            <property name="restrictedUserAgents" value=""/>
-            <property name="server" value=""/>
-            <property name="socketBuffer" value="9000"/>
-            <property name="strategy" value="lf"/>
-            <property name="tcpNoDelay" value="true"/>
-            <property name="threadPriority" value="java.lang.Thread#NORM_PRIORITY"/>
-        </property>
-        <property name="https-connector" value="connector">
-            <!-- see http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html for reference -->
-            <property name="allowTrace" value="false"/>
-            <property name="emptySessionPath" value="false"/>
-            <property name="enableLookups" value="false"/>
-            <property name="maxPostSize" value="2097152"/>
-            <property name="protocol" value="HTTP/1.1"/>
-            <property name="proxyName" value=""/>
-            <property name="proxyPort" value=""/>
-            <property name="redirectPort" value=""/>
-            <property name="scheme" value="https"/>
-            <property name="secure" value="true"/>
-            <property name="URIEncoding" value="UTF-8"/>
-            <property name="useBodyEncodingForURI" value="false"/>
-            <property name="xpoweredBy" value="true"/>
-            <!-- HTTP connector attributes -->
-            <property name="acceptCount" value="10"/>
-            <property name="address" value="0.0.0.0"/>
-            <property name="bufferSize" value="2048"/>
-            <property name="compressableMimeType" value="text/html,text/xml,text/plain"/>
-            <property name="compression" value="on"/>
-            <property name="connectionLinger" value="-1"/>
-            <property name="connectionTimeout" value="60000"/>
-            <property name="disableUploadTimeout" value="false"/>
-            <property name="maxHttpHeaderSize" value="4096"/>
-            <property name="maxKeepAliveRequests" value="100"/>
-            <property name="maxSpareThreads" value="50"/>
-            <property name="maxThreads" value="100"/>
-            <property name="minSpareThreads" value="4"/>
-            <property name="noCompressionUserAgents" value=""/>
-            <property name="port" value="8444"/>
-            <property name="restrictedUserAgents" value=""/>
-            <property name="server" value=""/>
-            <property name="socketBuffer" value="9000"/>
-            <property name="strategy" value="lf"/>
-            <property name="tcpNoDelay" value="true"/>
-            <property name="threadPriority" value="java.lang.Thread#NORM_PRIORITY"/>
-            <!-- SSL connector attributes -->
-            <property name="sSLImplementation" value="org.ofbiz.catalina.container.SSLImpl"/>
-            <property name="algorithm" value="SunX509"/>
-            <property name="clientAuth" value="want"/>
-            <property name="keystoreFile" value="framework/base/config/ofbizssl.jks"/>
-            <property name="keystorePass" value="changeit"/>
-            <property name="keystoreType" value="JKS"/>
-            <property name="sslProtocol" value="TLS"/>
-            <property name="ciphers" value=""/>
-        </property>
-    </container>
-
-    <container name="testtools-container" class="org.ofbiz.testtools.TestRunContainer"/>
 </ofbiz-containers>

Modified: ofbiz/branches/20120329_portletWidget/framework/base/config/testlist-containers.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/base/config/testlist-containers.xml?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/base/config/testlist-containers.xml (original)
+++ ofbiz/branches/20120329_portletWidget/framework/base/config/testlist-containers.xml Mon Jul  2 11:02:34 2012
@@ -20,13 +20,7 @@ under the License.
 
 <ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-containers.xsd">
-    <!-- load the ofbiz component container (always first) -->
-    <!--
-    <container name="component-container" class="org.ofbiz.base.container.ComponentContainer"/>
-    -->
-    <container name="component-container" class="org.ofbiz.base.container.JustLoadComponentsContainer"/>
 
-    <!--
-    -->
+    <container name="component-container" class="org.ofbiz.base.container.JustLoadComponentsContainer"/>
     <container name="testtools-container" class="org.ofbiz.testtools.TestListContainer"/>
 </ofbiz-containers>

Modified: ofbiz/branches/20120329_portletWidget/framework/base/dtd/ofbiz-component.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/base/dtd/ofbiz-component.xsd?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/base/dtd/ofbiz-component.xsd (original)
+++ ofbiz/branches/20120329_portletWidget/framework/base/dtd/ofbiz-component.xsd Mon Jul  2 11:02:34 2012
@@ -29,6 +29,7 @@ under the License.
                 <xs:element minOccurs="0" maxOccurs="unbounded" ref="test-suite"/>
                 <xs:element minOccurs="0" maxOccurs="unbounded" ref="keystore"/>
                 <xs:element minOccurs="0" maxOccurs="unbounded" ref="webapp"/>
+                <xs:element minOccurs="0" maxOccurs="unbounded" ref="container"/>
             </xs:sequence>
             <xs:attributeGroup ref="attlist.ofbiz-component"/>
         </xs:complexType>
@@ -242,6 +243,39 @@ under the License.
         <xs:attribute type="xs:string" name="name" use="required"/>
         <xs:attribute type="xs:string" name="value" use="required"/>
     </xs:attributeGroup>
+
+    <xs:element name="container">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" maxOccurs="unbounded" ref="property"/>
+            </xs:sequence>
+            <xs:attributeGroup ref="attlist.container"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:attributeGroup name="attlist.container">
+        <xs:attribute type="xs:string" name="name" use="required"/>
+        <xs:attribute type="xs:string" name="class" use="required"/>
+        <xs:attribute type="xs:string" name="loaders"/>
+    </xs:attributeGroup>
+    <xs:element name="property">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" maxOccurs="unbounded" ref="property"/>
+                <xs:element minOccurs="0" ref="property-value"/>
+            </xs:sequence>
+            <xs:attributeGroup ref="attlist.property"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:attributeGroup name="attlist.property">
+        <xs:attribute type="xs:string" name="name" use="required"/>
+        <xs:attribute type="xs:string" name="value"/>
+    </xs:attributeGroup>
+    <xs:element name="property-value" type="any"/>
+    <xs:complexType name="any" mixed="true">
+        <xs:sequence>
+            <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
+        </xs:sequence>
+    </xs:complexType>
 </xs:schema>
 <!--
     <ofbiz-component name="core">

Modified: ofbiz/branches/20120329_portletWidget/framework/base/dtd/ofbiz-containers.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/base/dtd/ofbiz-containers.xsd?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/base/dtd/ofbiz-containers.xsd (original)
+++ ofbiz/branches/20120329_portletWidget/framework/base/dtd/ofbiz-containers.xsd Mon Jul  2 11:02:34 2012
@@ -21,10 +21,19 @@ under the License.
     <xs:element name="ofbiz-containers">
         <xs:complexType>
             <xs:sequence>
+                <xs:element minOccurs="0" maxOccurs="unbounded" ref="loader"/>
                 <xs:element maxOccurs="unbounded" ref="container"/>
             </xs:sequence>
         </xs:complexType>
     </xs:element>
+    <xs:element name="loader">
+        <xs:complexType>
+            <xs:attributeGroup ref="attlist.loader"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:attributeGroup name="attlist.loader">
+        <xs:attribute type="xs:string" name="name" use="required"/>
+    </xs:attributeGroup>
     <xs:element name="container">
         <xs:complexType>
             <xs:sequence>
@@ -36,6 +45,7 @@ under the License.
     <xs:attributeGroup name="attlist.container">
         <xs:attribute type="xs:string" name="name" use="required"/>
         <xs:attribute type="xs:string" name="class" use="required"/>
+        <xs:attribute type="xs:string" name="loaders"/>
     </xs:attributeGroup>
     <xs:element name="property">
         <xs:complexType>

Modified: ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/component/ComponentConfig.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/component/ComponentConfig.java?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/component/ComponentConfig.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/component/ComponentConfig.java Mon Jul  2 11:02:34 2012
@@ -33,6 +33,8 @@ import javax.xml.parsers.ParserConfigura
 import javolution.util.FastList;
 import javolution.util.FastMap;
 
+import org.ofbiz.base.container.ContainerConfig;
+import org.ofbiz.base.container.ContainerException;
 import org.ofbiz.base.location.FlexibleLocation;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.KeyStoreUtil;
@@ -224,6 +226,20 @@ public class ComponentConfig {
         return webappInfos;
     }
 
+    public static List<ContainerConfig.Container> getAllContainers() {
+        return getAllContainers(null);
+    }
+
+    public static List<ContainerConfig.Container> getAllContainers(String componentName) {
+        List<ContainerConfig.Container> containers = FastList.newInstance();
+        for (ComponentConfig cc: getAllComponents()) {
+            if (componentName == null || componentName.equals(cc.getComponentName())) {
+                containers.addAll(cc.getContainers());
+            }
+        }
+        return containers;
+    }
+
     public static boolean isFileResourceLoader(String componentName, String resourceLoaderName) throws ComponentException {
         ComponentConfig cc = ComponentConfig.getComponentConfig(componentName);
         if (cc == null) {
@@ -339,6 +355,7 @@ public class ComponentConfig {
     protected List<TestSuiteInfo> testSuiteInfos = FastList.newInstance();
     protected List<KeystoreInfo> keystoreInfos = FastList.newInstance();
     protected List<WebappInfo> webappInfos = FastList.newInstance();
+    protected List<ContainerConfig.Container> containers = FastList.newInstance();
 
     protected ComponentConfig() {}
 
@@ -423,6 +440,13 @@ public class ComponentConfig {
             this.webappInfos.add(webappInfo);
         }
 
+        // containers
+        try {
+            this.containers.addAll(ContainerConfig.getContainers(xmlUrl));
+        } catch(ContainerException ce) {
+            throw new ComponentException("Error reading containers for component: " + this.globalName, ce);
+        }
+
         if (Debug.verboseOn()) Debug.logVerbose("Read component config : [" + rootLocation + "]", module);
     }
 
@@ -552,6 +576,10 @@ public class ComponentConfig {
         return this.webappInfos;
     }
 
+    public List<ContainerConfig.Container> getContainers() {
+        return this.containers;
+    }
+
     public boolean enabled() {
         return this.enabled;
     }

Modified: ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/BeanShellContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/BeanShellContainer.java?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/BeanShellContainer.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/BeanShellContainer.java Mon Jul  2 11:02:34 2012
@@ -34,13 +34,15 @@ public class BeanShellContainer implemen
 
     protected String configFileLocation = null;
     protected Interpreter bsh = null;
+    protected String containerName;
     protected String name;
     protected int port;
 
     /**
      * @see org.ofbiz.base.container.Container#init(java.lang.String[], java.lang.String)
      */
-    public void init(String[] args, String configFile) {
+    public void init(String[] args, String name, String configFile) {
+        this.containerName = name;
         this.configFileLocation = configFile;
     }
 
@@ -49,7 +51,7 @@ public class BeanShellContainer implemen
      */
     public boolean start() throws ContainerException {
         // get the container config
-        ContainerConfig.Container cfg = ContainerConfig.getContainer("beanshell-container", configFileLocation);
+        ContainerConfig.Container cfg = ContainerConfig.getContainer(containerName, configFileLocation);
 
         // get the app-name
         ContainerConfig.Container.Property appName = cfg.getProperty("app-name");
@@ -115,4 +117,8 @@ public class BeanShellContainer implemen
     public void stop() throws ContainerException {
         bsh = null;
     }
+
+    public String getName() {
+        return containerName;
+    }
 }

Modified: ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java Mon Jul  2 11:02:34 2012
@@ -32,11 +32,13 @@ public class ClassLoaderContainer implem
 
     public static final String module = ClassLoaderContainer.class.getName();
     protected static CachedClassLoader cl = null;
+    private String name;
 
     /**
      * @see org.ofbiz.base.container.Container#init(java.lang.String[], java.lang.String)
      */
-    public void init(String[] args, String configFile) throws ContainerException {
+    public void init(String[] args, String name, String configFile) throws ContainerException {
+        this.name = name;
         ClassLoader parent = Thread.currentThread().getContextClassLoader();
         if (parent == null) {
             parent = Classpath.class.getClassLoader();
@@ -63,6 +65,10 @@ public class ClassLoaderContainer implem
     public void stop() throws ContainerException {
     }
 
+    public String getName() {
+        return name;
+    }
+
     public static ClassLoader getClassLoader() {
         if (cl != null) {
             return cl;

Modified: ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/ComponentContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/ComponentContainer.java?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/ComponentContainer.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/ComponentContainer.java Mon Jul  2 11:02:34 2012
@@ -50,6 +50,7 @@ public class ComponentContainer implemen
     protected Classpath classPath = new Classpath(System.getProperty("java.class.path"));
     protected Classpath libraryPath = new Classpath(System.getProperty("java.library.path"));
     protected String configFileLocation = null;
+    private String name;
     private boolean loaded = false;
     private String instrumenterClassName;
     private String instrumenterFile;
@@ -57,11 +58,12 @@ public class ComponentContainer implemen
     /**
      * @see org.ofbiz.base.container.Container#init(java.lang.String[], java.lang.String)
      */
-    public void init(String[] args, String configFile) throws ContainerException {
+    public void init(String[] args, String name, String configFile) throws ContainerException {
+        this.name = name;
         this.configFileLocation = configFile;
 
         // get the config for this container
-        ContainerConfig.Container cc = ContainerConfig.getContainer("component-container", configFileLocation);
+        ContainerConfig.Container cc = ContainerConfig.getContainer(name, configFileLocation);
 
         // check for an override loader config
         String loaderConfig = null;
@@ -299,6 +301,10 @@ public class ComponentContainer implemen
     public void stop() throws ContainerException {
     }
 
+    public String getName() {
+        return name;
+    }
+
     /**
      * Static method for easy loading of components for use when the container system is not.
      *

Modified: ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/Container.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/Container.java?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/Container.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/Container.java Mon Jul  2 11:02:34 2012
@@ -40,12 +40,13 @@ public interface Container {
      * should initialize internal structures and then return.
      *
      * @param args Command-line arguments.
+     * @param name Unique name of the container's instance.
      * @param configFile Location of the configuration file used to load this container.
      * @throws ContainerException If an error was encountered. Throwing this exception
      * will halt container loading, so it should be thrown only when other containers
      * might depend on this one.
      */
-    public void init(String[] args, String configFile) throws ContainerException;
+    public void init(String[] args, String name, String configFile) throws ContainerException;
 
     /**
      * Start the container process. This method must not block - implementations
@@ -62,4 +63,11 @@ public interface Container {
      * @throws ContainerException If an error was encountered.
      */
     public void stop() throws ContainerException;
+
+    /**
+     * Return the container name.
+     *
+     * @return Name of the container's instance.
+     */
+    public String getName();
 }

Modified: ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/ContainerConfig.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/ContainerConfig.java?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/ContainerConfig.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/ContainerConfig.java Mon Jul  2 11:02:34 2012
@@ -30,6 +30,7 @@ import java.util.Map;
 import javax.xml.parsers.ParserConfigurationException;
 
 import org.ofbiz.base.lang.LockedBy;
+import org.ofbiz.base.util.StringUtil;
 import org.ofbiz.base.util.UtilURL;
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.UtilXml;
@@ -48,6 +49,29 @@ public class ContainerConfig {
     @LockedBy("ContainerConfig.class")
     private static Map<String, Container> containers = new LinkedHashMap<String, Container>();
 
+    public static List<String> getLoaders(String configFile) throws ContainerException {
+        URL xmlUrl = UtilURL.fromResource(configFile);
+        if (xmlUrl == null) {
+            throw new ContainerException("Could not find container config file " + configFile);
+        }
+        Document containerDocument = null;
+        try {
+            containerDocument = UtilXml.readXmlDocument(xmlUrl, true);
+        } catch (SAXException e) {
+            throw new ContainerException("Error reading the container config file: " + xmlUrl, e);
+        } catch (ParserConfigurationException e) {
+            throw new ContainerException("Error reading the container config file: " + xmlUrl, e);
+        } catch (IOException e) {
+            throw new ContainerException("Error reading the container config file: " + xmlUrl, e);
+        }
+        Element root = containerDocument.getDocumentElement();
+        List<String> result = new ArrayList<String>();
+        for (Element curElement: UtilXml.childElementList(root, "loader")) {
+            result.add(curElement.getAttribute("name"));
+        }
+        return result;
+    }
+
     public static Container getContainer(String containerName, String configFile) throws ContainerException {
         Container container = containers.get(containerName);
         if (container == null) {
@@ -172,13 +196,15 @@ public class ContainerConfig {
     }
 
     public static class Container {
-        public String name;
-        public String className;
-        public Map<String, Property> properties;
+        public final String name;
+        public final String className;
+        public final List<String> loaders;
+        public final Map<String, Property> properties;
 
         public Container(Element element) {
             this.name = element.getAttribute("name");
             this.className = element.getAttribute("class");
+            this.loaders = StringUtil.split(element.getAttribute("loaders"), ",");
 
             properties = new LinkedHashMap<String, Property>();
             for (Element curElement: UtilXml.childElementList(element, "property")) {

Modified: ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/ContainerLoader.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/ContainerLoader.java?rev=1356181&r1=1356180&r2=1356181&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/ContainerLoader.java (original)
+++ ofbiz/branches/20120329_portletWidget/framework/base/src/org/ofbiz/base/container/ContainerLoader.java Mon Jul  2 11:02:34 2012
@@ -28,11 +28,13 @@ import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
+import org.ofbiz.base.component.ComponentConfig;
 import org.ofbiz.base.start.Config;
 import org.ofbiz.base.start.StartupException;
 import org.ofbiz.base.start.StartupLoader;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.base.util.UtilXml;
 
 /**
  * An object that loads containers (background processes).
@@ -74,10 +76,10 @@ public class ContainerLoader implements 
         if (this.loaded || this.unloading) {
             return;
         }
-        Debug.logInfo("[Startup] Loading containers...", module);
         this.loadedContainers.clear();
         // get this loader's configuration file
         this.configFile = config.containerConfig;
+        Debug.logInfo("[Startup] Loading containers from " + configFile, module);
         Collection<ContainerConfig.Container> containers = null;
         try {
             containers = ContainerConfig.getContainers(configFile);
@@ -91,6 +93,7 @@ public class ContainerLoader implements 
             if (this.unloading) {
                 return;
             }
+            Debug.logInfo("Loading container: " + containerCfg.name, module);
             Container tmpContainer = loadContainer(containerCfg, args);
             this.loadedContainers.add(tmpContainer);
             containerMap.put(containerCfg.name, tmpContainer);
@@ -118,6 +121,33 @@ public class ContainerLoader implements 
         if (this.unloading) {
             return;
         }
+
+        List<String> loaders = null;
+        try {
+            loaders = ContainerConfig.getLoaders(configFile);
+        } catch (ContainerException e) {
+            throw new StartupException(e);
+        }
+        List<ContainerConfig.Container> containersDefinedInComponents = ComponentConfig.getAllContainers();
+        for (ContainerConfig.Container containerCfg: containersDefinedInComponents) {
+            boolean matchingLoaderFound = false;
+            if (UtilValidate.isEmpty(containerCfg.loaders) && UtilValidate.isEmpty(loaders)) {
+                matchingLoaderFound = true;
+            } else {
+                for (String loader: loaders) {
+                    if (UtilValidate.isEmpty(containerCfg.loaders) || containerCfg.loaders.contains(loader)) {
+                        matchingLoaderFound = true;
+                        break;
+                    }
+                }
+            }
+            if (matchingLoaderFound) {
+                Debug.logInfo("Loading component's container: " + containerCfg.name, module);
+                Container tmpContainer = loadContainer(containerCfg, args);
+                this.loadedContainers.add(tmpContainer);
+                containerMap.put(containerCfg.name, tmpContainer);
+            }
+        }
         // Get hot-deploy container configuration files
         ClassLoader loader = Thread.currentThread().getContextClassLoader();
         Enumeration<URL> resources;
@@ -178,7 +208,7 @@ public class ContainerLoader implements 
 
         // initialize the container object
         try {
-            containerObj.init(args, configFile);
+            containerObj.init(args, containerCfg.name, configFile);
         } catch (ContainerException e) {
             throw new StartupException("Cannot init() " + containerCfg.name, e);
         } catch (java.lang.AbstractMethodError e) {
@@ -226,6 +256,7 @@ public class ContainerLoader implements 
             if (this.unloading) {
                 return;
             }
+            Debug.logInfo("Starting container " + container.getName(), module);
             try {
                 container.start();
             } catch (ContainerException e) {
@@ -233,6 +264,7 @@ public class ContainerLoader implements 
             } catch (java.lang.AbstractMethodError e) {
                 throw new StartupException("Cannot start() " + container.getClass().getName(), e);
             }
+            Debug.logInfo("Started container " + container.getName(), module);
         }
     }
 
@@ -250,11 +282,13 @@ public class ContainerLoader implements 
                 // shutting down in reverse order
                 for (int i = this.loadedContainers.size(); i > 0; i--) {
                     Container container = this.loadedContainers.get(i-1);
+                    Debug.logInfo("Stopping container " + container.getName(), module);
                     try {
                         container.stop();
                     } catch (ContainerException e) {
                         Debug.logError(e, module);
                     }
+                    Debug.logInfo("Stopped container " + container.getName(), module);
                 }
             }
         }