Ok I feel stupid. seems another developer on my team added another spring context loader which generated the premature event
Please ignore my last 2 emails :-( On 18/06/2015 10:29 AM, "Jason Pell" <[email protected]> wrote: > after further interrogation of the code the start should have been called > before spring finished loading > > My issue is the ServerRegistry does not contain all the jaxws:endpoints > when the spring application listener fires. > > Anyone got any thoughts as to why? > On 18/06/2015 9:30 AM, "Jason Pell" <[email protected]> wrote: > >> Hi, >> >> As part of starting up my application I want to know when all services >> have started. Unfortunately in the case of cxf, the Endpoints have all >> been created by the time I get the >> ApplicationListener<ContextRefreshedEvent> but the servers may actually >> still be starting. >> >> It would be useful to register a ServerLifeCycleListener which has a new >> method: >> >> void serverCreated(Server server); >> >> I could then use this to correlated the corresponding startServer(Server >> server) events to know exactly when the spring context is "really" ready. >> >> I know this is a compatibility issue and wanted to know what other devs >> thought of the idea and whether its ok if I implement it into 2.7, 3.x and >> 3.1? >> >> Or any alternatives are welcome >> >> Currently what I am doing is overriding the ServerLifeCycleManager and >> intercepting any ManagedEndpoint registrations and sending them onto a >> custom listener. >> >> >> https://github.com/pellcorp/JavaFirst/blob/cxf27/JavaFirst/src/main/java/com/pellcorp/cxf/DelegateServerLifeCycleManagerImpl.java >> >> >>
