* Create and configure the XmlMapper we will be using.
*/
private XmlMapper createMapper() {
// Initialize the mapper
XmlMapper mapper = new XmlMapper();
mapper.setDebug(999);
// Configure the actions we will be using
; // FIXME -- Adapter or Connector or something!
mapper.addRule("Engine", mapper.objectCreate("org.apache.tomcat.core.StandardEngine", "className"));
mapper.addRule("Engine", mapper.setProperties());
mapper.addRule("Engine/Host", mapper.objectCreate("org.apache.tomcat.core.StandardHost", "className"));
mapper.addRule("Engine/Host", mapper.setProperties());
mapper.addRule("Engine/Host", mapper.addChild("addChild", "org.apache.tomcat.Container"));
mapper.addRule("Engine/Host/Context", mapper.objectCreate("org.apache.tomcat.core.StandardContext", "className"));
mapper.addRule("Engine/Host/Context", mapper.setProperties());
mapper.addRule("Engine/Host/Context", mapper.addChild("addChild", "org.apache.tomcat.Container"));
; // FIXME -- Process web.xml as well!!!
mapper.addRule("Engine/Host/Context/Loader", mapper.objectCreate("org.apache.tomcat.core.StandardLoader", "className"));
mapper.addRule("Engine/Host/Context/Loader", mapper.setProperties());
mapper.addRule("Engine/Host/Context/Loader", mapper.addChild("setLoader", "org.apache.tomcat.Loader"));
mapper.addRule("Engine/Host/Context/Logger", mapper.objectCreate(null, "className"));
mapper.addRule("Engine/Host/Context/Logger", mapper.setProperties());
mapper.addRule("Engine/Host/Context/Logger", mapper.addChild("setLogger", "org.apache.tomcat.Logger"));
mapper.addRule("Engine/Host/Context/Manager", mapper.objectCreate("org.apache.tomcat.session.StandardManager", "className"));
mapper.addRule("Engine/Host/Context/Manager", mapper.setProperties());
mapper.addRule("Engine/Host/Context/Manager", mapper.addChild("setManager", "org.apache.tomcat.Manager"));
mapper.addRule("Engine/Host/Context/Realm", mapper.objectCreate(null, "className"));
mapper.addRule("Engine/Host/Context/Realm", mapper.setProperties());
mapper.addRule("Engine/Host/Context/Realm", mapper.addChild("setRealm", "org.apache.tomcat.Realm"));
mapper.addRule("Engine/Host/Context/Resources", mapper.objectCreate("org.apache.tomcat.core.StandardResources", "className"));
mapper.addRule("Engine/Host/Context/Resources", mapper.setProperties());
mapper.addRule("Engine/Host/Context/Resources", mapper.addChild("setResources", "org.apache.tomcat.Resources"));
mapper.addRule("Engine/Host/Context/Valve", mapper.objectCreate(null, "className"));
mapper.addRule("Engine/Host/Context/Valve", mapper.setProperties());
mapper.addRule("Engine/Host/Context/Valve", mapper.addChild("addValve", "org.apache.tomcat.Valve"));
mapper.addRule("Engine/Host/Loader", mapper.objectCreate("org.apache.tomcat.core.StandardLoader", "className"));
mapper.addRule("Engine/Host/Loader", mapper.setProperties());
mapper.addRule("Engine/Host/Loader", mapper.addChild("setLoader", "org.apache.tomcat.Loader"));
mapper.addRule("Engine/Host/Logger", mapper.objectCreate(null, "className"));
mapper.addRule("Engine/Host/Logger", mapper.setProperties());
mapper.addRule("Engine/Host/Logger", mapper.addChild("setLogger", "org.apache.tomcat.Logger"));
mapper.addRule("Engine/Host/Manager", mapper.objectCreate("org.apache.tomcat.session.StandardManager", "className"));
mapper.addRule("Engine/Host/Manager", mapper.setProperties());
mapper.addRule("Engine/Host/Manager", mapper.addChild("setManager", "org.apache.tomcat.Manager"));
mapper.addRule("Engine/Host/Realm", mapper.objectCreate(null, "className"));
mapper.addRule("Engine/Host/Realm", mapper.setProperties());
mapper.addRule("Engine/Host/Realm", mapper.addChild("setRealm", "org.apache.tomcat.Realm"));
mapper.addRule("Engine/Host/Resources", mapper.objectCreate("org.apache.tomcat.core.StandardResources", "className"));
mapper.addRule("Engine/Host/Resources", mapper.setProperties());
mapper.addRule("Engine/Host/Resources", mapper.addChild("setResources", "org.apache.tomcat.Resources"));
mapper.addRule("Engine/Host/Valve", mapper.objectCreate(null, "className"));
mapper.addRule("Engine/Host/Valve", mapper.setProperties());
mapper.addRule("Engine/Host/Valve", mapper.addChild("addValve", "org.apache.tomcat.Valve"));
mapper.addRule("Engine/Loader", mapper.objectCreate("org.apache.tomcat.core.StandardLoader", "className"));
mapper.addRule("Engine/Loader", mapper.setProperties());
mapper.addRule("Engine/Loader", mapper.addChild("setLoader", "org.apache.tomcat.Loader"));
mapper.addRule("Engine/Logger", mapper.objectCreate(null, "className"));
mapper.addRule("Engine/Logger", mapper.setProperties());
mapper.addRule("Engine/Logger", mapper.addChild("setLogger", "org.apache.tomcat.Logger"));
mapper.addRule("Engine/Manager", mapper.objectCreate("org.apache.tomcat.session.StandardManager", "className"));
mapper.addRule("Engine/Manager", mapper.setProperties());
mapper.addRule("Engine/Manager", mapper.addChild("setManager", "org.apache.tomcat.Manager"));
mapper.addRule("Engine/Realm", mapper.objectCreate(null, "className"));
mapper.addRule("Engine/Realm", mapper.setProperties());
mapper.addRule("Engine/Realm", mapper.addChild("setRealm", "org.apache.tomcat.Realm"));
mapper.addRule("Engine/Resources", mapper.objectCreate("org.apache.tomcat.core.StandardResources", "className"));
mapper.addRule("Engine/Resources", mapper.setProperties());
mapper.addRule("Engine/Resources", mapper.addChild("setResources", "org.apache.tomcat.Resources"));
mapper.addRule("Engine/Valve", mapper.objectCreate(null, "className"));
mapper.addRule("Engine/Valve", mapper.setProperties());
mapper.addRule("Engine/Valve", mapper.addChild("addValve", "org.apache.tomcat.Valve"));
return (mapper);
// FIXME - When do we call start() on all of these objects?