[ https://issues.apache.org/jira/browse/OFBIZ-7754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15368022#comment-15368022 ]
Wai commented on OFBIZ-7754: ---------------------------- Regarding property values: A property can have both a value or empty. 'empty' simply means that a property is commented out or present but contain an empty value. If the value is empty, then a default value would be that coded in the software. Ofbiz modes: I think we need to consider ofbiz in the 1)single tenant mode and 2) multitenant mode. In single tenant mode, ofbiz should only be using the properties files. Using the database to store similar properties would be redundant. If the owner wished to change the properties, one would just modify the relevant properties file. Methods of deployment: I can think of a few methods of ofbiz deployment. Deployment#1) owner of ofbiz(in single tenant mode) is also the user In such a setup. The user would not require a database version of property files. The owner can simply modify the appropriate files. Deployment#2) owner of ofbiz(in single tenant mode) is a provider of ofbiz service to paid users. In such a setup, multiple instances of ofbiz is run on separate ports(perhaps in separate virtual machines). Each ofbiz instance is assigned to a paid user. Hence, a database equivalent of changeable properties is placed in the database associated with each paid user. This would allow the owner to simply modify the property values tailored to each paid user. Based on the previous comments, it seems the paid user is able to load seed data himself. Note#1: I believe this is the original intent of why a database version of properties was created. In such a scenario, if the database property is missing or contains an empty value for a given paid user, ofbiz would fallback on the value of the file-based property value. Note#2: The peculiar interaction between the file-based property and the database-based property as it was coded (ie. before my patch) is as follows. The peculiar aspect is useCase#3. why have a database-based property if it is not going to override the file-based version. Hence, if database-based property has an empty value then it is meant to be empty (and thus use the hardcoded default in ofbiz code). As mentioned in the section "Regarding property values" above. it is possible to have a property that contains an empty value. it is the same as commenting out the property in the file. {{monospaced}} database-based property file-based property result ----------------------- ------------------- ------ useCase#1:property1=value1 property1=value2 use property1=value1 useCase#2:nil property1=value2 use property1=value2 useCase#3:property1= property1=value2 use property1=value2 (this scenario is strange???) {{monospaced}} Deployment#3) owner of ofbiz(in multitenant mode) is a provider of ofbiz service to paid users. In such a setup, one instance of ofbiz is serving multiple paid users. Each paid user accesses his assigned database via the one instance of ofbiz. Each database would contain it's own property values and the paid user has access and is responsible for configuring his own property values. The properties that are available for the paid user to modify is determined by the ofbiz owner. The interaction between database-based property and file-based property is as follows. Notice that if a database-entry is present, its value(or lack thereof) would always override that of the file-based version. {{ database-based property file-based property result ----------------------- ------------------- ------ useCase#1:property1=value1 property1=value2 use property1=value1 useCase#2:nil property1=value2 use property1=value2 useCase#3:property1= property1=value2 use property1= }} > The big problem when load seed. > ------------------------------- > > Key: OFBIZ-7754 > URL: https://issues.apache.org/jira/browse/OFBIZ-7754 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: Trunk > Reporter: Kongrath Suankaewmanee > Assignee: Jacques Le Roux > Attachments: OFBIZ-7754.patch > > > Hi All, > Regarding, [OFBIZ-7112|https://issues.apache.org/jira/browse/OFBIZ-7112] > That's good for who start on use the ofbiz with initial setup, but not for > the site that already online and has to update the OFBiz core. Because when > has update OFBiz core they will use command load-seed for update. > The problem is if we use load-seed mean the configuration data that's already > exists will be replaced by the data from this file, > *CommonSystemPropertyData.xml* > So, for my suggestion should change the reader from *seed* to *seed-initial* > or remove systemPropertyValue from the data file. > Thank you, > Kongrath -- This message was sent by Atlassian JIRA (v6.3.4#6332)