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.