axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chinmoy Chakraborty <cch...@gmail.com>
Subject Re: How to get ConfigurationContext in password callback class?
Date Thu, 05 May 2011 16:54:56 GMT
OK...but how can I access ConfigurationContext in CallbackHandler class? Is
there a way?



On Thu, May 5, 2011 at 10:21 PM, Sagara Gunathunga <
sagara.gunathunga@gmail.com> wrote:

> On Thu, May 5, 2011 at 5:03 PM, Chinmoy Chakraborty <cchinu@gmail.com>
> wrote:
> > Hello!!
> > I need to access ConfigurationContext in a password callback class
> > (implements CallbackHandler). How I can achieve that? I tried following
> > code:
> > MessageContext msgCtx = MessageContext.getCurrentMessageContext();
> >     ConfigurationContext configCtx = null;
> >     if (msgCtx != null) {
> >       configCtx = msgCtx.getConfigurationContext();
> >     }
>
> Above code is invalid in the context of CallbackHandler. The purpose
> of CallbackHandler is to deal with passwords  and not possible to
> access  MessageContext/ConfigurationContext in CallbackHandler class.
>
> Thanks !
>
> > but in above scenario MessageContext is always null which is I guess
> > expected. The reason I wanted to do that is I want to share a custom
> > attribute there. I also can do that in ServletContext also. Any idea?
> >
> > Chinmoy
>
>
>
> --
> Sagara Gunathunga
>
> Blog - http://ssagara.blogspot.com
> Web - http://people.apache.org/~sagara/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

Mime
View raw message