axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James M Snell" <jasn...@us.ibm.com>
Subject Proposed modifications to Handler/Service registry mechanism
Date Mon, 24 Sep 2001 22:49:05 GMT
Ok, after giving it some thought, I'd like to propose some significant 
modifications to the current deployment registry mechanism in Axis.  I'd 
go ahead and make these changes, but the delta would be significant.  So I 
want to run them through the filter of public opinion first.  If I don't 
hear any complaints by the end of the week, I'll get started on these 
changes.

Below is the summary of the changes.

===
The Resolver interface is a replacement for the HandlerRegistry mechanism 
that makes the deployment of services, handlers and transports much more 
flexible. 

Resolver Interfaces
===================

public interface Resolver {
  public Handler resolve(ResolverContext context);
}

public interface ResolverContext {
  public String getKey();
  public Object getParameter(String name);
  public Iterator getParameters();
}



Axis Resolver
=============

public class AxisResolver implements Resolver {

   private Vector resolvers = new Vector();

   public void registerResolver(Resolver resolver) {
      resolvers.add(resolver);
   }

   public Handler resolve(ResolverContext context) {
      for (Iterator i = resolvers.iterator(); i.hasNext();) {
         Handler h = ((Resolver)i.next()).resolve(context);
         if (h != null) return h;
      }
      return null;
   }

}


Planned Resolver Implementations (I may not be able to get to all of these 
myself)
=====================================================================
JavaResolver
JWSResolver
WSDLResolver
EJBResolver
BSFResolver
COMResolver
SOAP2xResolver (for backwards compatibility)
TransportResolver

How would resolvers be configured?
==================================
Resolvers would be registered during the Axis configuration step.  A 
global AxisResolver instance would be initialized and access through the 
AxisEngine.

Where/How would the AxisResolver be used?
=========================================
The Resolver interface is an inline replacement for any HandlerRegistry 
instance being used.

What is the ResolverContext?
=========================
The ResolverContext provides access to all of the information necessary 
for resolving a handler/service.  This would need to be prepared by Axis.

Examples
=========
Resolving a Java class:

    AxisResolver.registerResolver(new JavaResolver());
    Handler h = AxisResolver.resolve(new 
AxisResolverContext("org.apache.axis.handlers.LoggingHandler"));

Resolving a JWS:

    AxisResolver.registerResolver(new JWSResolver());
    Handler h = AxisResolver.resolve(new 
AxisResolverContext("/services/stockquote.jws"));

Resolving a WSDL defined service

    AxisResolver.registerResolver(new WSDLResolver());
    Handler h = AxisResolver.resolve(new 
AxisResolverContext("/services/stockquote.wsdl"));

Resolving an EJB service

    AxisResolver.registerResolver(new EJBResolver());
    Handler h = AxisResolver.resolve(new 
AxisResolverContext("EJB_LogicalName"));

Resolving a COM service

    AxisResolver.registerResolver(new COMResolver());
    Handler h = AxisResolver.resolve(new 
AxisResolverContext("services.MyWebService"));

Resolving a SOAP 2.x deployed service

    AxisResolver.registerResolver(new 
SOAP2xResolver(path_to_soap2x_deployment_registry));
    Handler h = AxisResolver.resolve(new 
AxisResolverContext("urn:DeployedServiceURI"));

Resolving the Input/Output chains for the SOAP over HTTP transport

    AxisResolver.registerResolver(new TransportResolver());
    TargetedChain tc = (TargetedChain)AxisResolver.resolve(new 
AxisResolverContext("http://schemas.xmlsoap.org/soap/http"));


Thoughts? Concerns?
 

- James Snell
     Software Engineer, Internet Emerging Technologies, IBM
     James M Snell/Fresno/IBM - jasnell@us.ibm.com
These things I have spoken to you, so that in Me you may have peace. 
In the world you have tribulation, but take courage; I have overcome the 
world. 
- John 16:33


Mime
View raw message