On Tue, Aug 21, 2012 at 12:41 AM, Anjana Fernando <[email protected]> wrote:
> Hi, > > I've added a new interface > "org.wso2.carbon.core.init.CarbonStartupListener", and a static method > "CarbonServerManager#addCarbonStartupListener(CarbonStartupListener > listener)", to get notifications when the Carbon server is fully > initialized. This is done from the class > "StartupFinalizerServiceComponent", where it keeps the list of registered > CarbonStartupListener objects, and at the end of the Carbon server init, > all the CarbonStartupListeners are notified. And, if the server is already > initialized when a addCarbonStartupListener is called, it will be > immediately called back, without it being stored. > > This functionality was basically required for the ntask implementation, > where the server has to be fully initialized before the scheduled tasks are > run, for example, this is a required by BAM tasks and also data services > scheduled tasks, where the fully required resources are only available > after the Carbon server is fully initialized. > Great, Thanks Anjana. > > The changed code can be found in the following locations: > > * > https://svn.wso2.org/repos/wso2/carbon/kernel/branches/4.0.0/core/org.wso2.carbon.core/4.0.1/src/main/java/org/wso2/carbon/core/init/CarbonServerManager.java > * > https://svn.wso2.org/repos/wso2/carbon/kernel/branches/4.0.0/core/org.wso2.carbon.core/4.0.1/src/main/java/org/wso2/carbon/core/init/CarbonStartupListener.java > * > https://svn.wso2.org/repos/wso2/carbon/kernel/branches/4.0.0/core/org.wso2.carbon.core/4.0.1/src/main/java/org/wso2/carbon/core/internal/StartupFinalizerServiceComponent.java > > And the usage of the above functionality in ntask can be found at: > > * > https://svn.wso2.org/repos/wso2/carbon/platform/branches/4.0.0/components/ntask/org.wso2.carbon.ntask.core/4.0.1/src/main/java/org/wso2/carbon/ntask/core/service/impl/TaskServiceImpl.java > > Cheers, > Anjana. > -- > *Anjana Fernando* > Associate Technical Lead > WSO2 Inc. | http://wso2.com > lean . enterprise . middleware > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
