Thanks Taher.
regds mallah. On Thu, Aug 9, 2018 at 3:30 PM, Taher Alkhateeb <slidingfilame...@gmail.com> wrote: > Hi Rajesh, > > We usually implement our work using JIRA [1]. So I recommend you apply > your patch against the latest version of trunk over there and then ask > for it to be committed. > > [1] https://issues.apache.org/jira/browse/OFBIZ > > On Tue, Aug 7, 2018 at 10:06 PM, Rajesh Mallah <mallah.raj...@gmail.com> > wrote: > > > > Hello Everyone / Mr Scott , > > > > I have been able to churn out a patch finally. > > > > The request level dispatcher is being stored in a member variable of > > a class derived from XmlRpcHttpRequestConfigImpl . > > > > in the execute method of ServiceRpcHandler the dispatcher is being > > extracted from the config. > > > > This has been tested in a simulated concurrent scenario that was > > previously failing to provide correct results unless dispatcher was > > localized at request level. > > > > Kindly have a look at the attached patch. > > > > regds > > mallah > > > > > > On Tue, Aug 7, 2018 at 11:08 AM, Rajesh Mallah <mallah.raj...@gmail.com> > > wrote: > >> > >> > >> Hi , > >> > >> I was giving this problem another shot but need help. > >> > >> > >> The original problem is that , it is not possible to direct > >> XML / RPC requests to specific tenants in a multi-tenant > >> environment. This problem is significant as it forces us to have > >> multiple instances of ofbiz running which are not utilized to fullest > >> extent. > >> > >> > >> The exact problem i am facing is that i need to get 'HttpServletRequest' > >> object inside the handler that implements XmlRpcHandler. This is to > >> create "local" copies of dispatcher and delegator on per - request basis > >> as Scott suggested not to use the class level variables of the singleton > >> due to concurrency concerns. > >> > >> pls refer: > >> framework/webapp/src/main/java/org/apache/ofbiz/webapp/ > event/XmlRpcEventHandler.java > >> > >> if we are able to get HttpServletRequest inside the handler > >> we could get the delegator and dispatcher as: > >> > >> ===================== > >> dispatcher = (LocalDispatcher) request.getAttribute("dispatcher"); > >> delegator = (Delegator) request.getAttribute("delegator"); > >> > >> ===================== > >> > >> A JIRA for the same was already filed: > >> > >> >> https://issues.apache.org/jira/browse/OFBIZ-10284 > >> > >> Someone else had also faced a similar situation here: > >> > >> https://coderanch.com/t/415677/java/remote-IP-Address-JAX-RPC > >> > >> > >> Any suggestions is humbly solicited. > >> > >> regds > >> mallah. > >> > >> > >> > >> > >> > > >