axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Daniels <>
Subject RE: HTTP Authentication in Axis
Date Tue, 04 Dec 2001 23:08:24 GMT

We came up with a much better way to do this whole pattern this afternoon on

Essentially, the idea is to use ThreadLocal storage to keep the current
MessageContext, and make it available via some static method like
MessageContext.getCurrentContext().  Each time the AxisEngine enters
invoke(), it will : 1) store the old value in a local variable, 2) set it to
the MessageContext which was passed in to invoke(), 3) do the normal logic,
and 4) reset it to the old value in a finally {} block.

This would allow you to easily build something like your suggested

It also will clean up a lot of code in the engine and in the WSDL stub
generators, which will no longer need to deal with special-casing the
MessageContext as first argument hack.  Sam's going to be implementing this

This, incidentally, is definitely an axis-dev type of conversation... :)


> -----Original Message-----
> From: Wendell J Bouknight []
> Sent: Tuesday, December 04, 2001 4:25 PM
> To:
> Subject: Re: HTTP Authentication in Axis
> That's not quite what I meant.
> I was suggesting that perhaps the AuthorizationFactory should take the
> MessageContext as a parameter.
> AuthInfoFactory.getAuthInfoFactory(MessageContext mc).getAuthInfo()
> or something to this effect. This would require Axis to 
> maintain a table of
> all current requests (if it's not already done). I wouldn't expect a
> published WebService method to require a MessageContext parameter -
> exposing it breaks the transparency and interoperability 
> benefits provided
> by Axis.
> Personally, I don't understand how
>    AuthInfo auth = AuthInfoFactory.getAuthInfo();
> isn't already broken today. If you have 2 or more concurrent request
> inbound to Axis, how is the above line of code able to 
> distinguish between
> individual services.
> I hope someone from the developer mailing list is monitoring 
> this. I jumped
> off because I 15-20 messages a day in my inbox from one list 
> was driving me
> crazy!   :)
> Jason Bouknight

View raw message