// in Tomcat 6 the OpenEjb war is normally in webapps, but we just scan all hosts directories
for (Service service : ServerFactory.getServer().findServices()) {
Container container = service.getContainer();
if (container instanceof StandardEngine) {
StandardEngine engine = (StandardEngine) container;
for (Container child : engine.findChildren()) {
if (child instanceof StandardHost) {
StandardHost host = (StandardHost) child;
String appBase = host.getAppBase();
// determine the host dir (normally webapps)