Good suggestion. That way they can add their own exception handling into the 
JAXWSPublisher to handle individual endpoints. I will give it  a try.

Thanks.
________________________________________
From: Daniel Kulp [[email protected]]
Sent: Monday, October 24, 2011 2:30 PM
To: Seumas Soltysik
Cc: [email protected]
Subject: Re: jaxws:endpoint failure stops initialization of other 
jaxws:endpoints

On Monday, October 24, 2011 2:20:47 PM Seumas Soltysik wrote:
> Thanks Dan.
>
> So for customers who want to avoid this possible failure at start-up but
> want to maintain use of CXF configuration, do you suggest individually
> publishing endpoints in code and use the createdFromAPI attribute in the
> jaxws:endpoint configuration?

Likely yes.   You could  also add publish="false" to the jaxws:endpoints in
the configs and then write a simple bean that would publish those:

public class JAXWSPublisher {
      public JAXWSPublisher(List<Endpoint> eps) {
         for (Endpoint e: eps) {
            e.publish(null);
        }
     }
}

and in spring:


<jaxws:endpoint id="foo"..... publish="false"/>
<jaxws:endpoint id="bar"..... publish="false"/>

<bean class="JAXWSPublisher">
    <constructor-arg>
          <list>
               <bean ref="foo"/>
               <bean ref="bar"/>
....


I *THINK* something like that would work.


Dan




> ________________________________________
> From: Daniel Kulp [[email protected]]
> Sent: Friday, October 21, 2011 8:34 PM
> To: [email protected]
> Cc: Seumas Soltysik
> Subject: Re: jaxws:endpoint failure stops initialization of other
> jaxws:endpoints
> On Friday, October 21, 2011 4:02:26 PM Seumas Soltysik wrote:
> > If I have spring conifg with 3 different jaxws:endpoints defined
> > corresponding to 3 different ports expressed in a service element in a
> > wsdl and say the first endpoint fails to initialize because of  a bad
> > address in the case of http or because a jms connection fails in the
> > case of jms, the the 2nd and 3rd endpoints will not initialize.
> >
> > This behaviour seems to be in CXF 2.1 -> 2.3. I find this behaviour to
> > be
> > strange since in seems the initialization of endpoints should be
> > independent of each other. If one endpoint fails to initialized because
> > a
> > broker is down, why should this affect the initialization of other
> > endpoints?
> >
> > Is there some reason I am missing to explain why the Bus initialization
> > of endpoints works in this manner?
> >
> > BTW my server which initializes these endpoints simply consists of a
> > creating a Bus from a SpringBusFactory using a Spring configuration file
> > containing the above mentioned jaxws:endpoints.
>
> Well, it's really the way Spring is designed and more or less falls into how
> spring developers would expect it to work.   If spring fails to create a
> bean for any reason it shuts down the context and throws an exception up.
> Thus, the current behavior is exactly as per expectations, IMO.
>
> --
> Daniel Kulp
> [email protected]
> http://dankulp.com/blog
> Talend - http://www.talend.com
--
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to