[jira] Created: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)
Multi-Tenant Support (Login Based)
----------------------------------

                 Key: OFBIZ-3540
                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
             Project: OFBiz
          Issue Type: New Feature
          Components: framework
    Affects Versions: SVN trunk
            Reporter: David E. Jones
            Assignee: David E. Jones
            Priority: Minor
             Fix For: SVN trunk


Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).

If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).

Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".

NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).


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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David E. Jones updated OFBIZ-3540:
----------------------------------

    Attachment: MultiTenant20100305.patch

Attached initially complete (still fairly simple) implementation of multi-tenant support.

> Multi-Tenant Support (Login Based)
> ----------------------------------
>
>                 Key: OFBIZ-3540
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: David E. Jones
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: MultiTenant20100305.patch
>
>
> Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).
> If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).
> Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".
> NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Gray updated OFBIZ-3540:
------------------------------

    Attachment: MultiTenant20100305.patch

LdapLoginWorker's doBasicLogout calls hadn't been updated to the new signature, fixed in this newer patch (that's the only change I've made)

> Multi-Tenant Support (Login Based)
> ----------------------------------
>
>                 Key: OFBIZ-3540
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: David E. Jones
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: MultiTenant20100305.patch, MultiTenant20100305.patch
>
>
> Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).
> If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).
> Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".
> NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Gray updated OFBIZ-3540:
------------------------------

    Attachment: MultiTenant20100305.patch

Sorry, forgot to svn add the new files before creating the patch, here's the correct copy.

> Multi-Tenant Support (Login Based)
> ----------------------------------
>
>                 Key: OFBIZ-3540
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: David E. Jones
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: MultiTenant20100305.patch, MultiTenant20100305.patch, MultiTenant20100305.patch
>
>
> Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).
> If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).
> Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".
> NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Scott Gray commented on OFBIZ-3540:
-----------------------------------

Hi David, thanks for your work, it looks like a great start.  
Two issues I've come across so far:
1. ant run-tests no longer works
2. It looks like all tenants have access to the Tenant* tables so they could easily change their connection to one of the other databases.  Is this what the isManager field is intended for? (It doesn't seem to have any logic attached to it at the moment)

> Multi-Tenant Support (Login Based)
> ----------------------------------
>
>                 Key: OFBIZ-3540
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: David E. Jones
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: MultiTenant20100305.patch, MultiTenant20100305.patch, MultiTenant20100305.patch
>
>
> Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).
> If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).
> Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".
> NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Mridul Pathak commented on OFBIZ-3540:
--------------------------------------

Hi David, I tried the attached patch and it work pretty well.  Thanks for this useful feature, it looks great.
I have one question about this feature; if I am deploying multiple ecommerce applications for various tenants on one OFBiz instance, how would we associate those ecommerce webapps with the respective tenants?

> Multi-Tenant Support (Login Based)
> ----------------------------------
>
>                 Key: OFBIZ-3540
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: David E. Jones
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: MultiTenant20100305.patch, MultiTenant20100305.patch, MultiTenant20100305.patch
>
>
> Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).
> If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).
> Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".
> NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

BJ Freeman commented on OFBIZ-3540:
-----------------------------------

this patch is using login.
another patch built on this one would have to be used for ecomerce as I see it. offf the top of my head using then Website Entity.\
see what david comes up with.

Thanks david for this so far.

> Multi-Tenant Support (Login Based)
> ----------------------------------
>
>                 Key: OFBIZ-3540
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: David E. Jones
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: MultiTenant20100305.patch, MultiTenant20100305.patch, MultiTenant20100305.patch
>
>
> Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).
> If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).
> Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".
> NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

David E. Jones commented on OFBIZ-3540:
---------------------------------------

In the web.xml file you can specify a delegator name and to specify a specific tenant use a delegator name like "default#DEMO1".

> Multi-Tenant Support (Login Based)
> ----------------------------------
>
>                 Key: OFBIZ-3540
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: David E. Jones
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: MultiTenant20100305.patch, MultiTenant20100305.patch, MultiTenant20100305.patch
>
>
> Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).
> If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).
> Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".
> NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Marc Morin commented on OFBIZ-3540:
-----------------------------------

From the experience of our multi-tenant implementation, we've noticed

- multi-tenant was easy to add for the base case, as this patch indicates, the delegator pretty much abstracted much of it away.
- we more formally, expanded the entity-engine.xml definition to define ftl templates for the tenant databases configuration.  When looking up a tenant's db configuration, we set the hostname, username, password, tenantId, etc in a context that is applied to generate the tenant's specific configuration.  This allows for changing the sequenced-id-prefix for each tenant, allowing "easier" merging of data between tenants.   We chose to use entirely different delegatorNames, such as 10000, 10001, etc.... directly from the SequenceValueItem.
- The EntityCache is per delegator, and not per unique datasource, we haven't changed this, but it essentially, prevents sharing the same datasource amongst tenants
- Selecting the delegator/tenant is needed in different areas of the application, via different techniques.   via explicity selection, as the login demo application here, but we've also need to associate the "hostname" of the HTTP request, to enable multiple entire instances, both authenticated and not, to be distinguishable.
- The dispatcher will create a seperate job manager for each "tenant".  This is fine for a small number of tenants, but with a larger number, a single JobPoller/Manager is required.  We've added these enhancements and additional tenantId field on the JobSandbox.  We interpret, "null" in tenantId, here to mean, replicate this job to run all all tenant instances.   Think of all the "cleanup" jobs, etc...
- Singleton JobManager also handles scheduling of jobs for tenants that haven't been "loaded"...  The current mechanism will not load the tenant, until someone logs in that instance.
- The life cycle, create, upgrade, decommission of the tenants is a non trivial amount of work. We've spent a large amount of effort here, to keep the support cost down for 1000's of tenants in a system.  Creating a new tenant from a "blank" template, applying upgrade sql files, etc...
- Since our service is a subscription, we modeled the tenant instance as a Product in our master instance.  We use the Subscription product behavior to help control the expiration, etc.. of the tenant.

Many of these changes are in our forked version of the code.  We can try to extract components that people feel would be beneficial if there is interest.

> Multi-Tenant Support (Login Based)
> ----------------------------------
>
>                 Key: OFBIZ-3540
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: David E. Jones
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: MultiTenant20100305.patch, MultiTenant20100305.patch, MultiTenant20100305.patch
>
>
> Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).
> If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).
> Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".
> NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

David E. Jones commented on OFBIZ-3540:
---------------------------------------

I've added the initial code to a branch which is available at this URL:

https://svn.apache.org/repos/asf/ofbiz/branches/multitenant20100310

This includes my original changes and Scott's update.

With it in a branch it will be a lot easier to keep track of changes and allow others to collaborate on this.

> Multi-Tenant Support (Login Based)
> ----------------------------------
>
>                 Key: OFBIZ-3540
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: David E. Jones
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: MultiTenant20100305.patch, MultiTenant20100305.patch, MultiTenant20100305.patch
>
>
> Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).
> If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).
> Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".
> NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Tim Ruppert commented on OFBIZ-3540:
------------------------------------

Thanks David for doing this.  Marc, there is interest in you guys contributing back early and often, so if you can help this process in any way, please step up.

> Multi-Tenant Support (Login Based)
> ----------------------------------
>
>                 Key: OFBIZ-3540
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: David E. Jones
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: MultiTenant20100305.patch, MultiTenant20100305.patch, MultiTenant20100305.patch
>
>
> Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).
> If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).
> Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".
> NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Saad Hage edited comment on OFBIZ-3540 at 3/18/10 6:46 PM:
-----------------------------------------------------------

If I understand well, this patch will be never added to 9.04 version.


 

> Multi-Tenant Support (Login Based)
> ----------------------------------
>
>                 Key: OFBIZ-3540
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: David E. Jones
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: MultiTenant20100305.patch, MultiTenant20100305.patch, MultiTenant20100305.patch
>
>
> Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).
> If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).
> Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".
> NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

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

Saad,

Right, only bug fixes are backported by the community. The reason is stability (in other word no regression, only amendent). If you need more, you have to make it yourself.

> Multi-Tenant Support (Login Based)
> ----------------------------------
>
>                 Key: OFBIZ-3540
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: David E. Jones
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: MultiTenant20100305.patch, MultiTenant20100305.patch, MultiTenant20100305.patch
>
>
> Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).
> If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).
> Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".
> NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Saad Hage commented on OFBIZ-3540:
----------------------------------

Thanks Jacques,

      Is there another solution in the current version 9.04 can support single instance of OFBIZ with multiple databases?

Thanks again.

Saad

> Multi-Tenant Support (Login Based)
> ----------------------------------
>
>                 Key: OFBIZ-3540
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: David E. Jones
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: MultiTenant20100305.patch, MultiTenant20100305.patch, MultiTenant20100305.patch
>
>
> Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).
> If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).
> Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".
> NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

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

Saad,

No, at least for multi-tenants. You could ever use multiples databases for differents purpose. For instance OOTB 2 DB are used: localderby and localderbyolap but that's, in any way, related to multi-tenants.

> Multi-Tenant Support (Login Based)
> ----------------------------------
>
>                 Key: OFBIZ-3540
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: David E. Jones
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: MultiTenant20100305.patch, MultiTenant20100305.patch, MultiTenant20100305.patch
>
>
> Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).
> If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).
> Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".
> NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

BJ Freeman commented on OFBIZ-3540:
-----------------------------------

as with any patch or branches, you can spend enough time and integrate them.
if you followed best practices on you mods you should be have to port them over once the multitentant is merged back into the trunk.
if it is included in the 10.4 you you can upgrade to that.
that is my 2 cents

> Multi-Tenant Support (Login Based)
> ----------------------------------
>
>                 Key: OFBIZ-3540
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: David E. Jones
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: MultiTenant20100305.patch, MultiTenant20100305.patch, MultiTenant20100305.patch
>
>
> Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).
> If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).
> Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".
> NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Saad Hage commented on OFBIZ-3540:
----------------------------------

I'm currently writing a web application can easily deployed in OFBiz platform. This application will use many functionality of OFBiz (accounting, ..), and will be hosted. We have very very small clients and I can't create an instance of OFBiz for each of them, this very expensive. Each OFBiz instance take about 200 meg in RAM. That's why a solution like multi-tenants is very important for us. My concern with this branch is won't be supported by OFBiz team like 9.04 branch.

Anyway, Jacques, can you suggest an  idea (other than multi-tenants) or an architecture to resolve this ?

Regards,

Saad

> Multi-Tenant Support (Login Based)
> ----------------------------------
>
>                 Key: OFBIZ-3540
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: David E. Jones
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: MultiTenant20100305.patch, MultiTenant20100305.patch, MultiTenant20100305.patch
>
>
> Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).
> If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).
> Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".
> NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

BJ Freeman updated OFBIZ-3540:
------------------------------

    Attachment: ecommercetenatsadd.patch

This adds ecommerce sites for tenant1 and tenant2

> Multi-Tenant Support (Login Based)
> ----------------------------------
>
>                 Key: OFBIZ-3540
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: David E. Jones
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: ecommercetenatsadd.patch, MultiTenant20100305.patch, MultiTenant20100305.patch, MultiTenant20100305.patch
>
>
> Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).
> If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).
> Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".
> NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

BJ Freeman edited comment on OFBIZ-3540 at 3/26/10 4:39 AM:
------------------------------------------------------------

This adds ecommerce sites for tenant1 and tenant2
http://localhost:8080/ecomtenant1/control/main
http://localhost:8080/ecomtenant2/control/main

      was (Author: bjfreeman):
    This adds ecommerce sites for tenant1 and tenant2
 

> Multi-Tenant Support (Login Based)
> ----------------------------------
>
>                 Key: OFBIZ-3540
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: David E. Jones
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: ecommercetenatsadd.patch, MultiTenant20100305.patch, MultiTenant20100305.patch, MultiTenant20100305.patch
>
>
> Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).
> If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).
> Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".
> NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3540) Multi-Tenant Support (Login Based)

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

BJ Freeman commented on OFBIZ-3540:
-----------------------------------

when I do:
$ ant
$ java -Xmx512m -XX:MaxPermSize=128m -jar ofbiz.jar -install -readers=seed -delegator=default
$ java -Xmx512m -XX:MaxPermSize=128m -jar ofbiz.jar -install -readers=seed -delegator=default#DEMO1
I get a
Error creating delegator
Exception: org.ofbiz.entity.GenericEntityException
Message: No Tenant record found for delegator [default#DEM01] with
tenantId [DEM01]

if I do a
ant run-install
$ java -Xmx512m -XX:MaxPermSize=128m -jar ofbiz.jar -install -readers=seed -delegator=default
$ java -Xmx512m -XX:MaxPermSize=128m -jar ofbiz.jar -install -readers=seed -delegator=default#DEMO1
$ java -Xmx512m -XX:MaxPermSize=128m -jar ofbiz.jar -install -readers=seed -delegator=default#DEMO2

there is  no problems.
I do a
ant clean-all between each of these.
I  have done them 3 times.






> Multi-Tenant Support (Login Based)
> ----------------------------------
>
>                 Key: OFBIZ-3540
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3540
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: David E. Jones
>            Assignee: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: ecommercetenatsadd.patch, MultiTenant20100305.patch, MultiTenant20100305.patch, MultiTenant20100305.patch
>
>
> Support multiple tenants in a single instance of OFBiz. Each tenant will have its own databases (one for each entity group). Database settings will override the settings on the delegator with parameters from an entity record so that new tenants can be added on the fly without restarting the server (new tenants will still need to have data loaded in their databases just like any other).
> If valid Tenant ID is specified when user logs in then webapp context will be setup with tools for that tenant as a variation of the base delegator (including delegator, dispatcher, security, authz, visit, server hit, etc handled for it).
> Demo data includes a couple of sample tenants. After loading demo data (ant run-install) try logging in to webtools or any other admin app with the Tenant ID of "DEMO1".
> NOTE: this patch also addresses some stability issues with the LoginWorker, ControlServlet, Visit, and ServerHit functionality that was exposed while developing this. For example, after a logout functionality that runs in the ControlServlet may fail because things that were in the session before are not there any more. In this patch there is code to rebuild the request and session after logout (necessary for changing tenants, helpful for these other issues).

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

12