cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin" <>
Subject Re: changes in the https configuration
Date Fri, 25 May 2007 15:49:34 GMT

> Just to let everyone know that the solution to this problem was that
> the bean name was wrong due to the refactoring of Jetty out of the
> http module. That bean name is;
> org.apache.cxf.transports.http_jetty.JettyHTTPServerEngine.<port#>

So the name of the module has changed, that's fine...

>>             HTTPListenerConfigBean bean =
>>                 (HTTPListenerConfigBean)beanInstance;

I guess when we try to use this name we'll find out the actuall class of that beanInstance
upon the match, but do you know by any 
chance what is the class name is ? Has it changed too ? Conrad was saying no HTTPListenerConfigBean
instances were being passed to 
configureBean() method

> Note difference of "http" and "http_jetty" in the package name.
> However, I have a question about precedence on this method.
> Will Spring Configuration wipe out your setting here, since the
> super.configureBean() is after your programmatic call?
> Is that your intent?

That worked for us before, but it seems unsafe now that you've asked...That code is suffering
from "knowing too much about 
internals" :-), as far as I remember, the CXXF code which also configures the bean will check
if the policy is set and will reset 
only if it's not set...We can change the sequence, but we need to have the configureBean()
 working as expected first...

Thanks, Sergey

> Cheers,
> -Polar
> Conrad O'Dea wrote:
>> H,
>> I'm in the process of updating a service implementation to an up-to-date snapshot
of CXF.  In previous versions we were able to 
>> programmatically configure an endpoint to be https enabled by registering a Configurer
with the Bus and when called, the 
>> configurer did the following:
>>     public void configureBean(Object beanInstance) {
>>         String beanName = getBeanName(beanInstance);
>>         if (listenerBeanName.equals(beanName)
>>             && sslServerPolicy.getKeystore() != null) {
>>             HTTPListenerConfigBean bean =
>>                 (HTTPListenerConfigBean)beanInstance;
>>             if (!bean.isSetSslServer()) {
>>                 bean.setSslServer(sslServerPolicy);
>>             }
>>         }
>>         super.configureBean(beanInstance);
>>     }
>> However, with the latest update, this no longer works.  Firstly, we never see a beanInstance
with the right name (previously this 
>> was: org.apache.cxf.transport.http.JettyHTTPServerEngine.4968).  Secondly, none of
the beanInstances visited by the configurer 
>> are of type HTTPListenerConfigBean.
>> Is there some other way to set the SSL server policy for the endpoint?
>> BTW, the Configurer is registered like this:
>>         bus.setExtension(myConfigurer, Configurer.class);
>> and the endpoint itself is published using the JAX-WS APIs:
>>         Endpoint.publish(address, serviceImpl);
>> Has something changed recently to affect this?
>> thanks
>> Conrad

View raw message