Provider class which allows you to specify an Avalon ROLE for
servicing Axis SOAP requests.
The specified ROLE corresponds to a particular implementation
which is retrieved by a given Avalon ComponentManager .
For more information about Avalon, see the Avalon.
website.
To use this class, you need to add your Avalon ComponentManager
instance to the MessageContext that is Axis uses to process
messages with.
To do this you could for example subclass the AxisServlet and override the
createMessageContext() method adding the ComponentManager, eg:
protected MessageContext createMessageContext(...)
{
MessageContext context = super.createMessageContext();
context.setProperty(AvalonProvider.COMPONENT_MANAGER, m_manager);
return context;
}
and appropriately add the AvalonProvider to the list of handlers in your
server-config.wsdd (suggestions on how to improve this are welcomed)
This provider will use that ComponentManager reference to
retrieve objects.
In your deployment descriptor use the following syntax:
<service name="myservice" provider="java:Avalon">
<parameter name="role" value="my.avalon.role.name"/>
<parameter name="className" value="my.avalon.roles.interface.name"/>
<parameter name="allowedMethods" value="allowed.methods"/>
</service>
author: Marcus Crafter version: CVS $Id: AvalonProvider.java 433543 2006-08-22 06:22:54Z crossley $ |