[ https://issues.apache.org/jira/browse/OFBIZ-5729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14111807#comment-14111807 ]
Wai commented on OFBIZ-5729: ---------------------------- Pierre To answer your other question, "... but in what scenarios is it possible to set the records of the tenant in the Tenant and TenantDataResource entities without having executing the necessary preceding steps to create the base (main) delegator? ". Whenever you are accessing a tenant database using the console commands to manage tenant databases. eg. create-tenant, load-tenant*, etc. The issue will surface. So why do you not have this problem when you are using a webbrowser to login to a tenant database? The answer is that the ContextFilter object intercepting the http requests will firstly create a base delegator before ofbiz moves on to get/create a tenant delegator. So that's why the issue does not surface in this scenario. Wai > ofbiz hangs on installing tenant database > ------------------------------------------ > > Key: OFBIZ-5729 > URL: https://issues.apache.org/jira/browse/OFBIZ-5729 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Trunk > Reporter: Wai > Assignee: Adrian Crum > Attachments: ofbiz console output-with bug.log, ofbiz console > output-with fix.log, ofbiz-5729.patch, ofbiz-5729.patch > > > When installing data into a tenant database, ofbiz hangs. > Using the following command line. > $ ant load-tenant-data-readers -Ddata-readers=seed -DtenantId=DEMO1 > The problem is that ofbiz uses DelegatorFactory.getDelegator() to find/create > the tenant delegator, asynchronously, for the target tenant database using a > single daemon thread. As part of the tenant delegator creation, it needs to > find/create a base delegator. When the base delegator is intially absent, > ofbiz will block trying to create one by using the same daemon thread--which > is already being used. Hence, ofbiz is deadlocked. > The solution is to make sure that a base delegator is always created first > before a find/create tenant delegator is attempted. -- This message was sent by Atlassian JIRA (v6.2#6252)