I believe this interface should be renamed to "*ServerStartupObserver*". Lets deprecate the interface "ServerStartupHandler". The interface name ServerStartupHandler does not sound correct to me.
Since all the method names should start with a verb, I suggested following method names for the new ServerStartupObserver interface. /** * This method will be invoked just before completing server startup. E.g. before starting all the transports. */ *+completingServerStartup()* /** * This method will be invoked just after completing server startup. E.g. after starting all the transports. */ *+completedServerStartup()* Thanks, Sameera. On Tue, Aug 26, 2014 at 4:50 PM, Sagara Gunathunga <sag...@wso2.com> wrote: > > > > On Mon, Aug 25, 2014 at 4:43 AM, Anjana Fernando <anj...@wso2.com> wrote: > >> On Sat, Aug 23, 2014 at 6:16 AM, Afkham Azeez <az...@wso2.com> wrote: >> >>> Some handlers would need to be called after transports are started. So, >>> we could modify the interface to behave like the >>> Axis2ConfigurationContextObserver, and have pre & post transport >>> initialization methods. >>> >> >> +1, as I remember, ntask uses this to schedule the actual tasks at the >> very last moment, and specific task implementations like our data services >> tasks would require the transports to be available at that time. >> > > +1, I have modified ServerStartupHandler[1] as follows. > > - Deprecated invoke() method from 4.3.0. > > - Introduced following two methods to ServerStartupHandler interface. > > beforeTransportStart() > afterTransportStart() > > [1] - > https://raw.githubusercontent.com/sagaragu/carbon4-kernel/721d09daf11ee260cb67fcb4c5a580a51875f605/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/ServerStartupHandler.java > > > Thanks ! > >> >> Cheers, >> Anjana. >> >> >>> >>> >>> On Fri, Aug 22, 2014 at 8:15 PM, Sagara Gunathunga <sag...@wso2.com> >>> wrote: >>> >>>> >>>> According to current StartupFinalizerServiceComponent implementation, >>>> it calls registered ServerStartupHandlers after starting transports but >>>> IMHO it would be better to invoke ServerStartupHandlers before server start >>>> any transports. >>>> >>>> We have a requirement to perform few tasks just before server startup >>>> completion but before transport listeners get start. Further by looking at >>>> API-M APIManagerStartupPublisher class ( which is one of the >>>> implementation of ServerStartupHandler interface) I think it would be much >>>> better to add local APIs before start transports. >>>> >>>> Please refer the patch here[1] >>>> >>>> [1] - https://github.com/wso2-dev/carbon4-kernel/pull/84 >>>> >>>> Thanks ! >>>> >>>> -- >>>> Sagara Gunathunga >>>> >>>> Senior Technical Lead; WSO2, Inc.; http://wso2.com >>>> V.P Apache Web Services; http://ws.apache.org/ >>>> Linkedin; http://www.linkedin.com/in/ssagara >>>> Blog ; http://ssagara.blogspot.com >>>> >>>> >>> >>> >>> -- >>> *Afkham Azeez* >>> Director of Architecture; WSO2, Inc.; http://wso2.com >>> Member; Apache Software Foundation; http://www.apache.org/ >>> * <http://www.apache.org/>* >>> *email: **az...@wso2.com* <az...@wso2.com> >>> * cell: +94 77 3320919 <%2B94%2077%203320919> blog: * >>> *http://blog.afkham.org* <http://blog.afkham.org> >>> *twitter: **http://twitter.com/afkham_azeez* >>> <http://twitter.com/afkham_azeez> >>> * linked-in: **http://lk.linkedin.com/in/afkhamazeez >>> <http://lk.linkedin.com/in/afkhamazeez>* >>> >>> *Lean . Enterprise . Middleware* >>> >> >> >> >> -- >> *Anjana Fernando* >> Senior Technical Lead >> WSO2 Inc. | http://wso2.com >> lean . enterprise . middleware >> > > > > -- > Sagara Gunathunga > > Senior Technical Lead; WSO2, Inc.; http://wso2.com > V.P Apache Web Services; http://ws.apache.org/ > Linkedin; http://www.linkedin.com/in/ssagara > Blog ; http://ssagara.blogspot.com > > -- Sameera Jayasoma, Software Architect, WSO2, Inc. (http://wso2.com) email: same...@wso2.com blog: http://sameera.adahas.org twitter: https://twitter.com/sameerajayasoma flickr: http://www.flickr.com/photos/sameera-jayasoma/collections Mobile: 0094776364456 Lean . Enterprise . Middleware
_______________________________________________ Architecture mailing list Architecture@wso2.org https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture