You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by "Bono, Chris" <ch...@zilliant.com> on 2001/10/30 18:09:25 UTC
Custom Service class (loading providers)
In RPCRouterServlet.doPost() the provider is loaded as shown below:
<snip>
Provider provider;
if ( dd.getProviderType() == DeploymentDescriptor.PROVIDER_JAVA ) {
// Handle Java based services
provider = new org.apache.soap.providers.RPCJavaProvider();
} else if (dd.getProviderType() ==
DeploymentDescriptor.PROVIDER_USER_DEFINED) {
// Handle user-defined providers
provider = ServerUtils.loadProvider(dd);
} else {
// Handle scripts
provider = new org.apache.soap.providers.RPCJavaProvider();
}
</snip>
I am interested in using a custom Service class to load the provider, as
advertised in DeploymentDescriptor.setServiceClass(). However, the above
code seems to ignore using a custom service class to load the provider when
it is a DeploymentDescriptor.PROVIDER_USER_DEFINED type. My plans are to
modify the
provider = ServerUtils.loadProvider(dd); into
provider = loadProvider(dd);
where loadProvider uses the custom service class to load the provider. My
problem is that ServerUtils.loadProvider creates a new instance every call
and I would like to cache my provider.
Any ideas or comments are greatly appreciated.
TIA,
Chris Bono
bonoc@zilliant.com
512.531.8518
http://www.zilliant.com