KBPeerLauncher.java from Texai at Krugle
Show KBPeerLauncher.java syntax highlighted
/*
* KBPeerLauncher.java
*
* Created on April 25, 2007, 7:40 PM
*
* Description: Reads the properties file to launch the KB partition and shard peers.
*
* Copyright (C) April 25, 2007 Stephen L. Reed.
*
* This program is free software; you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program;
* if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package org.texai.kb;
import java.util.Enumeration;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;
import org.apache.log4j.Logger;
/**
*
* @author reed
*/
public class KBPeerLauncher {
/** the logger */
private static final Logger LOGGER = Logger.getLogger(BatchUUIDGenerator.class);
/** Creates a new instance of KBPeerLauncher. */
public KBPeerLauncher() {
}
/** Runs this instance. */
private void run() {
final ResourceBundle shardProperties = PropertyResourceBundle.getBundle("org.texai.kb.shard");
final Enumeration<String> keysEnumeration = shardProperties.getKeys();
while (keysEnumeration.hasMoreElements()) {
final String key = keysEnumeration.nextElement();
final String value = shardProperties.getString(key);
LOGGER.info("key: " + key + " value: " + value);
}
}
/** Executes this application.
*
* @param args the list of command line arguments (unused)
*/
public static void main(final String[] args) {
final KBPeerLauncher kbPeerLauncher = new KBPeerLauncher();
kbPeerLauncher.run();
}
}
See more files for this project here