You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2008/11/22 12:56:46 UTC

[jira] Commented: (OFBIZ-2020) Using one Ofbiz instance with multiple databases

    [ https://issues.apache.org/jira/browse/OFBIZ-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649914#action_12649914 ] 

Jacques Le Roux commented on OFBIZ-2020:
----------------------------------------

Hi Youssef,

Please use relative pathes for your patches (read carefully http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices)

Anyway after removing your specific path, I got this error. 

{code}
D:\Workspace\ofbizRun>patch -p0  0<ofbiz-multi.patch
patching file applications/party/entitydef/entitymodel.xml
Hunk #1 succeeded at 2615 (offset 4 lines).
patching file framework/common/config/CommonUiLabels.xml
patch: **** malformed patch at line 31: Index: framework/common/src/org/ofbiz/common/login/LoginServices.java
{code}

Then I tried with Eclipse (using Subclipse "Apply patch" option) and was able to apply the modified patch (see patch attached) but an hunk in entitymodel.xml. See entitymodel.xml.rej, I guess you need to put your comments at end of lines instead between but I can't see why and not sure though since I gave up at this stage

> Using one Ofbiz instance with multiple databases
> ------------------------------------------------
>
>                 Key: OFBIZ-2020
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2020
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>            Reporter: youssef khaye
>            Assignee: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: ofbiz-multi.patch
>
>
> I want to share my work with you implementing the use of one OFBiz instance with multiple databases, by defining multiple delegators, in the entityengine.xml, one for each databases. this is useful when we implementing ofbiz for semi-independent subsidiaries of one company having users allowed to use two or more databases.
> This involve mainly the user authentication procedure by asking for a company name in the login form. This company name represents a delegator name that describe a specific subsidiary database. After a successful user login operation, the passed company name is used to retrieve the corresponding delegator. The method CoreEvents.chageDelegator is modified to change the delegator of related Dispatcher and JobManager.
> Of course I needed to store the delegator name in the GenericValue UserLogin to navigate among different ofbiz applications keeping the same original database.
> I also provided a kind of mechanism to activate or deactivates the use of multi-delegator by adding a "multi.delegator" property in the security.properties configuration file that when set true, cause the ofbiz to display he company field in the login form and do the necessary work to switch from default database to the provided one.
> I will be open to discuss any suggestion for improving this issue.
> Following is a patch for current ofbiz trunk version:

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.