axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glen Daniels" <>
Subject Re: TypeMappings - lifecycles and locations
Date Fri, 01 Jun 2001 21:02:32 GMT

I have no problem with ACCESSING the TypeMappings via the MessageContext
(MessageContext.getTypeMappings() should stay).  But I don't think we should
have the MessageContext new-ing a TypeMappingRegistry itself, or storing a
static instance in the class either.

The server should put a reference to its "global" TypeMappingRegistry in the
MessageContext as soon as it gets it.  Then as soon as
setTargetService/setServiceHandler is called, that reference should change to
be the SOAPService's TypeMappingRegistry (which may be exactly the same
reference if the service has no specific mappings of its own).

Make more sense?


----- Original Message -----
From: "Rob Jellinghaus" <>
To: <>; <>
Sent: Friday, June 01, 2001 4:58 PM
Subject: Re: TypeMappings - lifecycles and locations

> At 04:38 PM 6/1/2001 -0400, Glen Daniels wrote:
> >> I don't see engines as being global.  I could have a server application
> >> with multiple instantiations of AxisEngine.
> >>
> >> I can see the need for that application to provide additional mappings.
> >> one invokes an engine with a message context, this seems like a reasonable
> >> place to provide this information to me.
> >
> >Does "this" mean the AxisEngine, or the MessageContext?
> >
> >If an application containing an AxisEngine (or two) wants additional
> >mappings, I can see putting them in the AxisEngine-scoped mappings, but
> >think putting them directly in the MessageContext makes any sense (unless
> >they're truly "per message" mappings, but I don't see any use-case for
> I guess the real issue here is, what is "AxisEngine scoping"?  Right now
> there are really only *two* scopes accessible to an Axis handler:  the
> MessageContext which gets passed in to it, and static (singleton) scope.
> Handlers don't have any direct access to the instance of the engine they're
> running under.  (Nor, I think, should they.)  The MessageContext is the
> only "scope-defining" object that a Handler has access to.
> The MessageContext does have the ENGINE_HANDLER property; perhaps this
> should be elevated to a method (getEngine? setEngine?) and then anything
> that is intended to be "engine scoped" could be accessed via that accessor.
>  Then the "engine glboal mappings" could be stored there, and a handler
> would access them via msgContext.getEngine().getTypeMappings() or something.
> Cheers,
> Rob

View raw message