service.addConnector(connector);
}
}
// Server/Service/Engine
EngineMetaData engineMetaData = serviceMetaData.getEngine();
org.apache.catalina.Engine engine =
(org.apache.catalina.Engine) getInstance(engineMetaData, "org.apache.catalina.core.StandardEngine");
addLifecycleListeners(engine, engineMetaData.getListeners());
engine.setName(engineMetaData.getName());
// FIXME: This should be done by XB
if (engineMetaData.getJvmRoute() != null) {
engine.setJvmRoute(StringPropertyReplacer.replaceProperties(engineMetaData.getJvmRoute()));
}
engine.getPipeline().addValve(new ActiveRequestResponseCacheValve());
engine.setDefaultHost(engineMetaData.getDefaultHost());
service.setContainer(engine);
// Server/Service/Engine/Realm
if (engineMetaData.getRealm() != null) {
engine.setRealm((org.apache.catalina.Realm) getInstance(engineMetaData.getRealm(), null));
}
// Server/Service/Engine/Valve
addValves(engine, engineMetaData.getValves());
// Server/Service/Engine/Host
if (engineMetaData.getHosts() != null)
{
Iterator<HostMetaData> hostMetaDatas = engineMetaData.getHosts().iterator();
while (hostMetaDatas.hasNext())
{
HostMetaData hostMetaData = hostMetaDatas.next();
org.apache.catalina.Host host =
(org.apache.catalina.Host) getInstance(hostMetaData, "org.apache.catalina.core.StandardHost");