[Jdvb-cvs] jdvb-server/src/uk/midearth/dvb/server JDVBServer.java,1.4,1.5
Status: Inactive
Brought to you by:
hundalz
|
From: pinder <hu...@us...> - 2006-02-25 15:19:57
|
Update of /cvsroot/jdvb/jdvb-server/src/uk/midearth/dvb/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3917/src/uk/midearth/dvb/server Modified Files: JDVBServer.java Log Message: added start/stop scripts no more commands line params. all use -Dprops.filename Index: JDVBServer.java =================================================================== RCS file: /cvsroot/jdvb/jdvb-server/src/uk/midearth/dvb/server/JDVBServer.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JDVBServer.java 25 Feb 2006 14:06:58 -0000 1.4 --- JDVBServer.java 25 Feb 2006 15:19:51 -0000 1.5 *************** *** 3,17 **** import org.apache.log4j.Logger; import uk.midearth.dvb.confParser.Configurator; public class JDVBServer { ! /** * Serial Version UID */ private static final long serialVersionUID = 1L; ! public static Logger LOG = Logger.getLogger(JDVBServer.class); - public JDVBServer() { --- 3,18 ---- import org.apache.log4j.Logger; + import uk.midearth.dvb.Constants; import uk.midearth.dvb.confParser.Configurator; + import uk.midearth.dvb.exception.JDVBException; public class JDVBServer { ! /** * Serial Version UID */ private static final long serialVersionUID = 1L; ! public static Logger LOG = Logger.getLogger(JDVBServer.class); public JDVBServer() { *************** *** 19,40 **** public static void main(String[] argv) { ! if ((argv.length != 2) && (argv.length != 3)) { ! LOG.error("JDVBServer usage:"); ! LOG.error(" java JDVBServer <channels config file> <server config file> [daemon]"); ! LOG.error("Quitting for now"); ! System.exit(1); ! } ! String configFilename = argv[0]; ! String serverFilename = argv[1]; ! Configurator.load(serverFilename); ! LOG.info("DVBServer>> Working on " + configFilename + " and " ! + serverFilename); ! //File newFile = new File(configFilename); ! if (argv.length == 3) { ! new RMI(configFilename, serverFilename, argv[2] ! .equalsIgnoreCase("daemon")); ! } else { ! new RMI(configFilename, serverFilename, false); } } --- 20,63 ---- public static void main(String[] argv) { ! // if ((argv.length != 2) && (argv.length != 3)) { ! // LOG.error("JDVBServer usage:"); ! // LOG.error(" java JDVBServer <channels config file> <server config ! // file> [daemon]"); ! // LOG.error("Quitting for now"); ! // System.exit(1); ! // } ! try { ! // the new method of getting properties is through a props.filename ! // system variable ! String propsFilename = System.getProperty("props.filename"); ! if (propsFilename == null) { ! LOG.error("Please define a property file using -Dprops.filename=<filename>"); ! System.exit(1); ! } ! ! // load the props filename ! Configurator.load(propsFilename); ! ! String configFilename = Configurator.getInstance().get( ! Constants.PROPS_CHANNELS); ! if (configFilename == null) { ! throw new JDVBException("Channels file not defined"); ! } ! String serverFilename = propsFilename; ! ! LOG.info("DVBServer>> Working on " + configFilename + " and " ! + serverFilename); ! // File newFile = new File(configFilename); ! ! if (argv.length == 3) { ! new RMI(configFilename, serverFilename, argv[2] ! .equalsIgnoreCase("daemon")); ! } else { ! new RMI(configFilename, serverFilename, false); ! } ! ! } catch (Throwable e) { ! LOG.error("General exception caught: " + e.getMessage(), e); } } |