Sanjiva Weerawarana wrote:
> On Mon, 2006-07-10 at 11:33 +0200, Carsten Ziegeler wrote:
>> While playing around with implementing my own handler, I found out,
>> that the getProperties() method of the MessageContext is not implemented
>> correctly: MessageContext overrides the property handling of the parent
>> class by setting/getting properties from the Options object. But
>> getProperties() is passed on to the parent class which then always
>> returns an empty map. (Using getOptions().getProperties() of course works).
>> If you need an implementation for getProperties() which uses the Options
>> object I can provide it.
> 
> IIRC, the behavior desired was for just the message context to use
> options' properties instead of using the local hashtable. This has
> something to do with allowing users to set stuff from outside via
> options and having them take effect at the various contexts.
> 
Ah, thanks for the info.

> So if the property is not found via options.getProperty() then we cross
> over to whatever level of other context is around (operation or service
> or .. etc.) and ask there. 
> 
> Note that setProperty() too has been overridden to match this behavior.
> 
> So in effect the properties hashtable inherited from the superclass is
> not used by the MessageContext class.
> 
Yes, except in the getProperties() method. If you do a setProperty("A",
"B") on the message context and then do a getProperties().get("A"), you
end up with getting null and not "B". So I think it should be fixed.

>> In addition it seems that the outgoing MessageContext objects do not
>> contain the servlet context. Is this by mistake or by design? If it's
>> the latter, how can I access the servlet context?
> 
> Its by design- you have to get the operation context from the outgoing
> MC and then get the incoming MC from that and look there for the servlet
> context and any other "incoming" info.
> 
Ok, thanks!

Carsten
-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to