You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by geecxf <am...@ge.com> on 2013/05/29 18:47:22 UTC

Question regarding StaticSTSProperties

While experimenting with the STS code I discovered that configureProperties()
method of the StaticSTSProperties class requires a CXF message context in
order to execute successfully. 

This seems a little strange to me because as far as I understand the
properties are set once and there is nothing about them is related to the
request context. The way it is implemented now you basically have to wait
until the service is invoked before you can initialize the properties. Is
there a reason why it was implemented this way?

I ask because it just doesn't seem right. I would expect to be able to call
configureProperties() at some point in time before the service was invoked. 



--
View this message in context: http://cxf.547215.n5.nabble.com/Question-regarding-StaticSTSProperties-tp5728499.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Question regarding StaticSTSProperties

Posted by geecxf <am...@ge.com>.
Thanks Dan,

I'll do that.



--
View this message in context: http://cxf.547215.n5.nabble.com/Question-regarding-StaticSTSProperties-tp5728499p5728518.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Question regarding StaticSTSProperties

Posted by Daniel Kulp <dk...@apache.org>.
On May 29, 2013, at 12:47 PM, geecxf <am...@ge.com> wrote:

> While experimenting with the STS code I discovered that configureProperties()
> method of the StaticSTSProperties class requires a CXF message context in
> order to execute successfully. 
> 
> This seems a little strange to me because as far as I understand the
> properties are set once and there is nothing about them is related to the
> request context. The way it is implemented now you basically have to wait
> until the service is invoked before you can initialize the properties. Is
> there a reason why it was implemented this way?
> 
> I ask because it just doesn't seem right. I would expect to be able to call
> configureProperties() at some point in time before the service was invoked. 

This definitely looks like a bug.  In there, if the various properties objects are String's, then we end up doing:

 Bus bus = PhaseInterceptorChain.getCurrentMessage().getExchange().getBus();
            ResourceManager rm = bus.getExtension(ResourceManager.class);

to get a ResourceManager to try and resolve those.   Most likely, we should do:

1) Allow setting a Bus object on the properties so that the actual bus used is settable.

2) If bus is null, call BusFactory.getThreadDefaultBus() instead.   

Please log a bug.

Dan



> 
> 
> 
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Question-regarding-StaticSTSProperties-tp5728499.html
> Sent from the cxf-user mailing list archive at Nabble.com.

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com