You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-dev@ws.apache.org by Eugene Prokopiev <pr...@stc.donpac.ru> on 2006/11/03 14:06:06 UTC
Single handler instance for all requests
Hi,
What is the right way to use single handler instance for all requests to
methods of one class?
--
Thanks,
Eugene Prokopiev
---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org
Re: Single handler instance for all requests
Posted by Eugene Prokopiev <pr...@stc.donpac.ru>.
> But replacing one factory with another
> AbstractReflectiveHandlerMapping.java looks like dirty hack. What is the
> right way to do it?
Replacing can be done with
AbstractReflectiveHandlerMapping.setRequestProcessorFactoryFactory but
this is wrong way.
I need to instantiate handler with my own factory based on any String
value (abstract class name from any source: JNDI name or Spring bean
name), not on Class type. So, it looks like I need to modify
PropertyHandlerMapping.addHandler,
AbstractReflectiveHandlerMapping.registerPublicMethods,
AbstractReflectiveHandlerMapping.newXmlRpcHandler,
RequestProcessorFactory.getRequestProcessorFactory or create parallel
stack to use String instead of Class. In my own RequestProcessorFactory
I need to load existing and configured handler from any location (JNDI
or Spring context).
Is this right way or any other exists?
--
Thanks,
Eugene Prokopiev
---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org
Re: Single handler instance for all requests
Posted by Eugene Prokopiev <pr...@stc.donpac.ru>.
> What is the right way to use single handler instance for all requests to
> methods of one class?
I found this code in AbstractReflectiveHandlerMapping.java :
private RequestProcessorFactoryFactory requestProcessorFactoryFactory =
new RequestProcessorFactoryFactory.RequestSpecificProcessorFactoryFactory();
RequestProcessorFactoryFactory is interface with two factories:
RequestSpecificProcessorFactoryFactory and
StatelessProcessorFactoryFactory.
But replacing one factory with another
AbstractReflectiveHandlerMapping.java looks like dirty hack. What is the
right way to do it?
--
Thanks,
Eugene Prokopiev
---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org