Index: /Volumes/Datas/Workspaces/Lokahi/lokahi-trunk/src/java/org/apache/lokahi/tomcat/api/worker/ServerXmlFileFactory.java =================================================================== --- /Volumes/Datas/Workspaces/Lokahi/lokahi-trunk/src/java/org/apache/lokahi/tomcat/api/worker/ServerXmlFileFactory.java (revision 0) +++ /Volumes/Datas/Workspaces/Lokahi/lokahi-trunk/src/java/org/apache/lokahi/tomcat/api/worker/ServerXmlFileFactory.java (revision 0) @@ -0,0 +1,76 @@ +package org.apache.lokahi.tomcat.api.worker; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; + +import org.apache.log4j.Logger; + +public class ServerXmlFileFactory { + + public final static String PROP_IMPLEMENTATION = ServerXmlFileFactory.class.getName().toString(); + + public final static String DEFAULT_IMPLEMENTATION = ServerXmlFileImpl.class.getName().toString(); + + private static final Logger logger = Logger.getLogger(ServerXmlFileFactory.class); + + private String implementation; + + private Constructor serverXmlFileCtor; + + private static ServerXmlFileFactory instance; + + private ServerXmlFileFactory() { + implementation = System.getProperty(PROP_IMPLEMENTATION,DEFAULT_IMPLEMENTATION); + try { + Class serverXmlFileClass = Class.forName(implementation); + serverXmlFileCtor = serverXmlFileClass.getConstructor(TomcatWorker.class); + } catch (ClassNotFoundException e) { + logger.error("Cannot instantiate implementation class '"+implementation+"': "+e.getMessage(),e); + } catch (NoSuchMethodException e) { + logger.error("Cannot instantiate implementation class '"+implementation+"': "+e.getMessage(),e); + } + } + + public static ServerXmlFileFactory getInstance() { + if (instance==null) { + instance = new ServerXmlFileFactory(); + } + return instance; + } + + public ServerXmlFile createServerXmlFile(TomcatWorker tw) { + try { + return (ServerXmlFile) serverXmlFileCtor.newInstance(tw); + } catch (InstantiationException e) { + logger.error("Cannot instantiate implementation class '"+implementation+"': "+e.getMessage(),e); + } catch (IllegalAccessException e) { + logger.error("Cannot instantiate implementation class '"+implementation+"': "+e.getMessage(),e); + } catch (InvocationTargetException e ) { + logger.error("Cannot instantiate implementation class '"+implementation+"': "+e.getMessage(),e); + } + return null; + } + /** + * @return the implementation + */ + public String getImplementation() { + return implementation; + } + + /** + * Set the name of the class to instantiate when constructing a ServerXmlFile. + * @param implementation the implementation to set + */ + public void setImplementation(String implementation) { + this.implementation = implementation; + try { + Class serverXmlFileClass = Class.forName(implementation); + serverXmlFileCtor = serverXmlFileClass.getConstructor(TomcatWorker.class); + } catch (ClassNotFoundException e) { + logger.error("Cannot instantiate implementation class '"+implementation+"': "+e.getMessage(),e); + } catch (NoSuchMethodException e) { + logger.error("Cannot instantiate implementation class '"+implementation+"': "+e.getMessage(),e); + } + } + +} Index: /Volumes/Datas/Workspaces/Lokahi/lokahi-trunk/src/java/org/apache/lokahi/tomcat/api/worker/TomcatWorker.java =================================================================== --- /Volumes/Datas/Workspaces/Lokahi/lokahi-trunk/src/java/org/apache/lokahi/tomcat/api/worker/TomcatWorker.java (revision 584847) +++ /Volumes/Datas/Workspaces/Lokahi/lokahi-trunk/src/java/org/apache/lokahi/tomcat/api/worker/TomcatWorker.java (working copy) @@ -228,7 +228,7 @@ /** @deprecated */ public String buildServerXML() throws SQLException { - ServerXmlFile sxf = new ServerXmlFile(this); + ServerXmlFile sxf = ServerXmlFileFactory.getInstance().createServerXmlFile(this); return sxf.build(); } @@ -239,7 +239,7 @@ public String buildConfForWeb() { String ret = "A database error has occurred."; try { - ServerXmlFile sxf = new ServerXmlFile(this); + ServerXmlFile sxf = ServerXmlFileFactory.getInstance().createServerXmlFile(this); ret = sxf.build(); } catch (SQLException e) { if (logger.isInfoEnabled()) { Index: /Volumes/Datas/Workspaces/Lokahi/lokahi-trunk/src/java/org/apache/lokahi/tomcat/api/worker/TomcatWorkerModel.java =================================================================== --- /Volumes/Datas/Workspaces/Lokahi/lokahi-trunk/src/java/org/apache/lokahi/tomcat/api/worker/TomcatWorkerModel.java (revision 584847) +++ /Volumes/Datas/Workspaces/Lokahi/lokahi-trunk/src/java/org/apache/lokahi/tomcat/api/worker/TomcatWorkerModel.java (working copy) @@ -195,7 +195,7 @@ } if (jobPool != null && tw.getTomcat() != null && f != null) { Job j = new Job(-1, s, tw.getTomcat().getBaseLocation() + "/conf/server.xml", tw.getHardware(), f, jobPool); - ServerXmlFile sxf = new ServerXmlFile(tw); + ServerXmlFile sxf = ServerXmlFileFactory.getInstance().createServerXmlFile(tw); j.setResult(sxf.build()); Job.store(j); HardwareModel hm = new HardwareModel(); Index: /Volumes/Datas/Workspaces/Lokahi/lokahi-trunk/src/java/org/apache/lokahi/tomcat/api/worker/ServerXmlFile.java =================================================================== --- /Volumes/Datas/Workspaces/Lokahi/lokahi-trunk/src/java/org/apache/lokahi/tomcat/api/worker/ServerXmlFile.java (revision 584847) +++ /Volumes/Datas/Workspaces/Lokahi/lokahi-trunk/src/java/org/apache/lokahi/tomcat/api/worker/ServerXmlFile.java (working copy) @@ -1,413 +0,0 @@ -/* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -*/ -package org.apache.lokahi.tomcat.api.worker; - -import org.apache.log4j.Logger; -import org.apache.lokahi.tomcat.api.entity.TomcatContext; -import org.apache.lokahi.tomcat.api.server.Tomcat; -import org.jdom.Attribute; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.output.Format; -import org.jdom.output.XMLOutputter; - -import java.sql.SQLException; -import java.util.Collection; - -/** - * @author The Apache Incubated Lokahi project - http://incubator.apache.org/lokahi/ - * @version $Id$ - */ -public class ServerXmlFile { - static final Logger logger = Logger.getLogger(ServerXmlFile.class); - - private TomcatWorker tw; - - public ServerXmlFile(TomcatWorker t) { - this.tw = t; - } - - public String build() throws SQLException { - Document doc = null; - if (tw.getType() == 4) { - doc = this.build4(); - } else if (tw.getType() == 5) { - doc = this.build5(); - } else if (tw.getType() == 6) { - doc = this.build6(); - } - XMLOutputter out = new XMLOutputter(Format.getPrettyFormat()); - if (logger.isDebugEnabled()) { - logger.debug("Returning " + out.outputString(doc)); - } - return out.outputString(doc); - } - - private Document build4() throws SQLException { - Tomcat tc = tw.getTomcat(); - Document doc = null; - if (tc != null) { - int httpPort = tc.getHttpPort(); - String shutdownPrt = Integer.toString(httpPort - 2); - String ajpPort = Integer.toString(httpPort - 1); - Element host = elementBuilder("Host", new Attribute[]{ - new Attribute("name", "localhost"), - new Attribute("debug", "0"), - new Attribute("appBase", "webapps"), - new Attribute("unpackWARs", "false") - }); -// if (tw.getHardware().getInstance().getPk() == 2) -// host.addContent(elementBuilder("Valve", new Attribute[]{ -// new Attribute("className", "org.apache.catalina.valves.RemoteAddrValve"), -// new Attribute("allow", "54.23.226.*,54.23.243.*,54.23.244.*,54.23.245.*,54.23.246.*,54.23.247.*,54.23.248.*,127.0.0.1,54.23.230.*,54.23.205.43,54.23.224.79,^54.3.214.1$,^54.23.206.6$,54.62.195.*,54.62.155.*,54.50.56.*,54.48.92.*,54.48.84.*,54.62.241.*") -// })); - Element defaultContext = new Element("DefaultContext"); - defaultContext.addContent(elementBuilder("Parameter", new Attribute[]{ - new Attribute("name", "MrkJvmHttp"), - new Attribute("value", Integer.toString(httpPort)), - new Attribute("override", "false") - })); - host.addContent(defaultContext); - Element tmAgent = elementBuilder("Context", new Attribute[]{ - new Attribute("path", "/TMAgent"), - new Attribute("docBase", "/usr/local/covalent/tomcat4.0.4/webapps/TMAgent"), - new Attribute("debug", "0"), - new Attribute("privileged", "true"), - }); -/* Enable below code once the TMAgent has been switched to keyless. -//todo ENABLE for keyless agent. - tmAgent = tmAgent.setContent(elementBuilder("Valve", new Attribute[]{ - new Attribute("className", "org.apache.catalina.valves.RemoteAddrValve"), - new Attribute("allow", "127.0.0.1") - })); - - */ - host = host.addContent(tmAgent); - Collection c = TomcatContext.getTomcatContexts(tw); - for (final TomcatContext context : c) { - host.addContent(context.buildServerXML()); - } - Element root = elementBuilder("Server", new Attribute[]{ - new Attribute("port", shutdownPrt), - new Attribute("shutdown", "SHUTDOWN"), - new Attribute("debug", "0") - }); - Element manager = elementBuilder("Manager", new Attribute[]{ - new Attribute("className", "org.apache.catalina.session.PersistentManager"), - new Attribute("debug", "0"), - new Attribute("saveOnRestart", "true"), - new Attribute("maxActiveSessions", "-1"), - new Attribute("minIdleSwap", "-1"), - new Attribute("maxIdleSwap", "-1"), - new Attribute("maxIdleBackup", "-1") - }); - manager = manager.addContent(elementBuilder("Store", new Attribute[]{ - new Attribute("className", "org.apache.catalina.session.FileStore") - })); - Element engine = elementBuilder("Engine", new Attribute[]{ - new Attribute("jvmRoute", tw.getWorkerName()), - new Attribute("name", "Agent" + shutdownPrt), - new Attribute("defaultHost", "localhost"), - new Attribute("debug", "0") - }); - engine = engine.addContent(elementBuilder("Logger", new Attribute[]{ - new Attribute("className", "org.apache.catalina.logger.FileLogger"), - new Attribute("prefix", "Agent" + shutdownPrt + '.'), - new Attribute("suffix", ".log"), - new Attribute("timestamp", "true") - })); - engine = engine.addContent(manager); - engine = engine.addContent(elementBuilder("Realm", new Attribute[]{ - new Attribute("className", "org.apache.catalina.realm.MemoryRealm") - })); - engine = engine.addContent(host); - Element service = elementBuilder("Service", new Attribute[]{new Attribute("name", "Agent" + shutdownPrt)}); - service = service.addContent(elementBuilder("Connector", new Attribute[]{ - new Attribute("className", "org.apache.ajp.tomcat4.Ajp13Connector"), - new Attribute("port", ajpPort), - new Attribute("minProcessors", "10"), - new Attribute("maxProcessors", "5000"), - new Attribute("acceptCount", "40"), - new Attribute("debug", "0"), - new Attribute("tomcatAuthentication", "false") - })); - service = service.addContent(elementBuilder("Connector", new Attribute[]{ - new Attribute("className", "org.apache.catalina.connector.http.HttpConnector"), - new Attribute("port", Integer.toString(httpPort)), - new Attribute("minProcessors", "10"), - new Attribute("maxProcessors", "1000"), - new Attribute("enambleLookups", "false"), - new Attribute("redirectPort", "8443"), - new Attribute("acceptCount", "10"), - new Attribute("debug", "0"), - new Attribute("connectionTimeout", "60000") - })); - service = service.addContent(engine); - root = root.addContent(service); - doc = new Document(root); - } - return doc; - } - - private Document build5() throws SQLException { - Tomcat tc = tw.getTomcat(); - Document doc = null; - if (tc != null) { - int httpPort = tc.getHttpPort(); - String shutdownPrt = Integer.toString(httpPort - 2); - String ajpPort = Integer.toString(httpPort - 1); - Element host = elementBuilder("Host", new Attribute[]{ - new Attribute("name", "localhost"), - new Attribute("debug", "0"), - new Attribute("appBase", "webapps"), - new Attribute("unpackWARs", "false"), - new Attribute("autoDeploy", "true"), - new Attribute("xmlValidation", "false"), - new Attribute("xmlNamespaceAware", "false") - }); -// if (tw.getHardware().getInstance().getPk() == 2) -// host.addContent(elementBuilder("Valve", new Attribute[]{ -// new Attribute("className", "org.apache.catalina.valves.RemoteAddrValve"), -// new Attribute("allow", "54.23.226.*,54.23.243.*,54.23.244.*,54.23.245.*,54.23.246.*,54.23.247.*,54.23.248.*,127.0.0.1,54.23.230.*,54.23.205.43,54.23.224.79,^54.3.214.1$,^54.23.206.6$,54.62.195.*,54.62.155.*,54.50.56.*,54.48.92.*,54.48.84.*,54.62.241.*") -// })); - Element defaultContext = new Element("DefaultContext"); - defaultContext.addContent(elementBuilder("Parameter", new Attribute[]{ - new Attribute("name", "MrkJvmHttp"), - new Attribute("value", Integer.toString(httpPort)), - new Attribute("override", "false") - })); - host.addContent(defaultContext); - Element tmAgent = elementBuilder("Context", new Attribute[]{ - new Attribute("path", "/TMAgent"), - new Attribute("docBase", "/opt/tmc/tomcat5.0.27/webapps/TMAgent"), - new Attribute("debug", "0"), - new Attribute("privileged", "true"), - }); -/* Enable below code once the TMAgent has been switched to keyless. -//todo ENABLE for keyless agent. - tmAgent = tmAgent.setContent(elementBuilder("Valve", new Attribute[]{ - new Attribute("className", "org.apache.catalina.valves.RemoteAddrValve"), - new Attribute("allow", "127.0.0.1") - })); - - */ - host = host.addContent(tmAgent); - Collection c = TomcatContext.getTomcatContexts(tw); - for (final TomcatContext context : c) { - host.addContent(context.buildServerXML()); - } - Element root = elementBuilder("Server", new Attribute[]{ - new Attribute("port", shutdownPrt), - new Attribute("shutdown", "SHUTDOWN"), - new Attribute("debug", "0") - }); - root.addContent(elementBuilder("Listener", new Attribute[]{ - new Attribute("className", "org.apache.catalina.mbeans.ServerLifecycleListener"), - new Attribute("debug", "0") - })); - root.addContent(elementBuilder("Listener", new Attribute[]{ - new Attribute("className", "org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"), - new Attribute("debug", "0") - })); - Element manager = elementBuilder("Manager", new Attribute[]{ - new Attribute("className", "org.apache.catalina.session.PersistentManager"), - new Attribute("debug", "0"), - new Attribute("saveOnRestart", "true"), - new Attribute("maxActiveSessions", "-1"), - new Attribute("minIdleSwap", "315"), - new Attribute("maxIdleSwap", "390"), - new Attribute("maxIdleBackup", "300") - }); - manager = manager.addContent(elementBuilder("Store", new Attribute[]{ - new Attribute("className", "org.apache.catalina.session.FileStore") - })); - Element engine = elementBuilder("Engine", new Attribute[]{ - new Attribute("jvmRoute", tw.getWorkerName()), - new Attribute("name", "Agent" + shutdownPrt), - new Attribute("defaultHost", "localhost"), - new Attribute("debug", "0") - }); - engine = engine.addContent(elementBuilder("Logger", new Attribute[]{ - new Attribute("className", "org.apache.catalina.logger.FileLogger"), - new Attribute("prefix", "Agent" + shutdownPrt + '.'), - new Attribute("suffix", ".log"), - new Attribute("timestamp", "true") - })); - engine = engine.addContent(manager); - engine = engine.addContent(host); - Element service = elementBuilder("Service", new Attribute[]{new Attribute("name", "Agent" + shutdownPrt)}); - service = service.addContent(elementBuilder("Connector", new Attribute[]{ - new Attribute("port", Integer.toString(httpPort)), - new Attribute("minSpareThreads", "25"), - new Attribute("maxSpareThreads", "75"), - new Attribute("enableLookups", "false"), - new Attribute("redirectPort", "8443"), - new Attribute("acceptCount", "100"), - new Attribute("debug", "0"), - new Attribute("connectionTimeout", "20000"), - new Attribute("disableUploadTimeout", "true") - })); - service = service.addContent(elementBuilder("Connector", new Attribute[]{ - new Attribute("port", ajpPort), - new Attribute("enableLookups", "false"), - new Attribute("tomcatAuthentication", "false"), - new Attribute("redirectPort", "8443"), - new Attribute("minProcessors", "10"), - new Attribute("maxProcessors", "5000"), - new Attribute("acceptCount", "100"), - new Attribute("debug", "0"), - new Attribute("protocol", "AJP/1.3") - })); - service = service.addContent(engine); - root = root.addContent(service); - doc = new Document(root); - } - return doc; - } - - private Document build6() throws SQLException { - Tomcat tc = tw.getTomcat(); - Document doc = null; - if (tc != null) { - int httpPort = tc.getHttpPort(); - String shutdownPrt = Integer.toString(httpPort - 2); - String ajpPort = Integer.toString(httpPort - 1); - Element host = elementBuilder("Host", new Attribute[]{ - new Attribute("name", "localhost"), - new Attribute("debug", "0"), - new Attribute("appBase", "webapps"), - new Attribute("unpackWARs", "false"), - new Attribute("autoDeploy", "true"), - new Attribute("xmlValidation", "false"), - new Attribute("xmlNamespaceAware", "false") - }); -// if (tw.getHardware().getInstance().getPk() == 2) -// host.addContent(elementBuilder("Valve", new Attribute[]{ -// new Attribute("className", "org.apache.catalina.valves.RemoteAddrValve"), -// new Attribute("allow", "54.23.226.*,54.23.243.*,54.23.244.*,54.23.245.*,54.23.246.*,54.23.247.*,54.23.248.*,127.0.0.1,54.23.230.*,54.23.205.43,54.23.224.79,^54.3.214.1$,^54.23.206.6$,54.62.195.*,54.62.155.*,54.50.56.*,54.48.92.*,54.48.84.*,54.62.241.*") -// })); - Element defaultContext = new Element("DefaultContext"); - defaultContext.addContent(elementBuilder("Parameter", new Attribute[]{ - new Attribute("name", "MrkJvmHttp"), - new Attribute("value", Integer.toString(httpPort)), - new Attribute("override", "false") - })); - host.addContent(defaultContext); -// Element tmAgent = elementBuilder("Context", new Attribute[]{ -// new Attribute("path", "/TMAgent"), -// new Attribute("docBase", "/opt/tmc/tomcat5.0.27/webapps/TMAgent"), -// new Attribute("debug", "0"), -// new Attribute("privileged", "true"), -// }); -/* Enable below code once the TMAgent has been switched to keyless. -//todo ENABLE for keyless agent. - tmAgent = tmAgent.setContent(elementBuilder("Valve", new Attribute[]{ - new Attribute("className", "org.apache.catalina.valves.RemoteAddrValve"), - new Attribute("allow", "127.0.0.1") - })); - - */ -// host = host.addContent(tmAgent); - Collection c = TomcatContext.getTomcatContexts(tw); - for (final TomcatContext context : c) { - host.addContent(context.buildServerXML()); - } - Element root = elementBuilder("Server", new Attribute[]{ - new Attribute("port", shutdownPrt), - new Attribute("shutdown", "SHUTDOWN"), - new Attribute("debug", "0") - }); - root.addContent(elementBuilder("Listener", new Attribute[]{ - new Attribute("className", "org.apache.catalina.mbeans.ServerLifecycleListener"), - new Attribute("debug", "0") - })); - root.addContent(elementBuilder("Listener", new Attribute[]{ - new Attribute("className", "org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"), - new Attribute("debug", "0") - })); - root.addContent(elementBuilder("Listener", new Attribute[]{ - new Attribute("className", "org.apache.catalina.storeconfig.StoreConfigLifecycleListener"), - new Attribute("debug", "0") - })); - Element manager = elementBuilder("Manager", new Attribute[]{ - new Attribute("className", "org.apache.catalina.session.PersistentManager"), - new Attribute("debug", "0"), - new Attribute("saveOnRestart", "true"), - new Attribute("maxActiveSessions", "-1"), - new Attribute("minIdleSwap", "315"), - new Attribute("maxIdleSwap", "390"), - new Attribute("maxIdleBackup", "300") - }); - manager = manager.addContent(elementBuilder("Store", new Attribute[]{ - new Attribute("className", "org.apache.catalina.session.FileStore") - })); - Element engine = elementBuilder("Engine", new Attribute[]{ - new Attribute("jvmRoute", tw.getWorkerName()), - new Attribute("name", "Agent" + shutdownPrt), - new Attribute("defaultHost", "localhost"), - new Attribute("debug", "0") - }); -// engine = engine.addContent(elementBuilder("Logger", new Attribute[]{ -// new Attribute("className", "org.apache.catalina.logger.FileLogger"), -// new Attribute("prefix", "Agent" + shutdownPrt + '.'), -// new Attribute("suffix", ".log"), -// new Attribute("timestamp", "true") -// })); - engine = engine.addContent(manager); - engine = engine.addContent(host); - Element service = elementBuilder("Service", new Attribute[]{new Attribute("name", "Agent" + shutdownPrt)}); - service = service.addContent(elementBuilder("Connector", new Attribute[]{ - new Attribute("port", Integer.toString(httpPort)), - new Attribute("maxThreads", "150"), - new Attribute("minSpareThreads", "25"), - new Attribute("maxSpareThreads", "75"), - new Attribute("enableLookups", "false"), - new Attribute("redirectPort", "8443"), - new Attribute("acceptCount", "100"), - new Attribute("debug", "0"), - new Attribute("connectionTimeout", "20000"), - new Attribute("disableUploadTimeout", "true") - })); - service = service.addContent(elementBuilder("Connector", new Attribute[]{ - new Attribute("port", ajpPort), - new Attribute("enableLookups", "false"), - new Attribute("tomcatAuthentication", "false"), - new Attribute("redirectPort", "8443"), - new Attribute("minProcessors", "10"), - new Attribute("maxProcessors", "5000"), - new Attribute("acceptCount", "100"), - new Attribute("debug", "0"), - new Attribute("protocol", "AJP/1.3") - })); - service = service.addContent(engine); - root = root.addContent(service); - doc = new Document(root); - } - return doc; - } - - private static Element elementBuilder(String name, Attribute[] a) { - Element ret = new Element(name); - for (final Attribute att : a) { - ret = ret.setAttribute(att); - } - return ret; - } - -} Index: /Volumes/Datas/Workspaces/Lokahi/lokahi-trunk/src/java/org/apache/lokahi/tomcat/api/worker/ServerXmlFileImpl.java =================================================================== --- /Volumes/Datas/Workspaces/Lokahi/lokahi-trunk/src/java/org/apache/lokahi/tomcat/api/worker/ServerXmlFileImpl.java (revision 584847) +++ /Volumes/Datas/Workspaces/Lokahi/lokahi-trunk/src/java/org/apache/lokahi/tomcat/api/worker/ServerXmlFileImpl.java (working copy) @@ -34,16 +34,19 @@ * @author The Apache Incubated Lokahi project - http://incubator.apache.org/lokahi/ * @version $Id$ */ -public class ServerXmlFile { - static final Logger logger = Logger.getLogger(ServerXmlFile.class); +public class ServerXmlFileImpl implements ServerXmlFile { + static final Logger logger = Logger.getLogger(ServerXmlFileImpl.class); private TomcatWorker tw; - public ServerXmlFile(TomcatWorker t) { + public ServerXmlFileImpl(TomcatWorker t) { this.tw = t; } - public String build() throws SQLException { + /* (non-Javadoc) + * @see org.apache.lokahi.tomcat.api.worker.ServerXmlFile#build() + */ +public String build() throws SQLException { Document doc = null; if (tw.getType() == 4) { doc = this.build4();