if(lcms == null) return;
final Set<ServerLifecycleModule> listenerSet = new HashSet<ServerLifecycleModule>();
for(int i=0;i<lcms.length;i++) {
final LifecycleModule next = lcms[i];
if ( isEnabled(next, mServerContext.getConfigContext()) ) {
int order = Integer.MAX_VALUE;
final String strOrder = next.getLoadOrder();
if (strOrder != null) {
try {
order = Integer.parseInt(strOrder);
} catch(NumberFormatException nfe) {
nfe.printStackTrace();
}
}
final ServerLifecycleModule slcm =
new ServerLifecycleModule(mServerContext, next.getName(), next.getClassName());
slcm.setLoadOrder(order);
slcm.setClasspath(next.getClasspath());
slcm.setIsFatal(next.isIsFailureFatal());
final ElementProperty[] s = next.getElementProperty();
if(s != null) {
for(int j=0;j< s.length;j++) {
final ElementProperty next1 = s[j];
slcm.setProperty(next1.getName(), next1.getValue());
}