LifeCycelBase作为众多组件的父类,其init()方法,第一次调用用是在StandardServer的start()方法中,其方法内容如下:
setStateInternal(LifecycleState.INITIALIZING, null, false);
initInternal();
setStateInternal(LifecycleState.INITIALIZED, null, false);
第一个方法是把组件的状态设置为了INITIALIZING。
第二个方法是是进入了StandardServer的initInternal()方法。
一、StandardServer.initInternal()
其initInternal方法如下,我们选择比较重要的部分显示:
super.initInternal();
// Register global String cache
// Note although the cache is global, if there are multiple Servers
// present in the JVM (may happen when embedding) then the same cache