/* This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. *
* This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.rzo.yajsw.app; import java.io.File; import java.util.HashMap; import java.util.List; import org.rzo.yajsw.boot.WrapperLoader; import org.rzo.yajsw.config.YajswConfigurationImpl; import org.rzo.yajsw.os.OperatingSystem; import org.rzo.yajsw.os.StopableService; import org.rzo.yajsw.wrapper.WrappedProcess; import org.rzo.yajsw.wrapper.WrappedProcessFactory; import org.rzo.yajsw.wrapper.WrappedProcessList; // TODO: Auto-generated Javadoc /** * The Class WrapperMainService. */ public class WrapperMainServiceUnix implements StopableService { /** The w. */ static WrappedProcess w; static volatile WrappedProcessList wList = new WrappedProcessList(); /** * Instantiates a new wrapper main service. */ public WrapperMainServiceUnix() { } // this is the wrapper for services /** * The main method. * * @param args * the arguments */ public static void main(String[] args) { String wrapperJar = WrapperLoader.getWrapperJar(); String homeDir = new File(wrapperJar).getParent(); if (!OperatingSystem.instance().setWorkingDir(homeDir)) { System.out.println("could not set working dir. pls check configuration or user rights :"+homeDir); } StopableService service = new WrapperMainServiceUnix(); YajswConfigurationImpl _config = new YajswConfigurationImpl(false); //w = WrappedProcessFactory.createProcess(_config); // start the application //w.setDebug(true); //w.init(); //w.setService(service); if (_config.containsKey("wrapperx.config")) { List