context.setName(contextName);
context.setAppBase(appBase);
if (context instanceof Lifecycle)
{
clazz = Class.forName(engine.getConfigClass());
LifecycleListener listener = (LifecycleListener) clazz.newInstance();
((Lifecycle) context).addLifecycleListener(listener);
}
engine.addChild(context);
}