colus 02/02/28 09:11:17
Modified: src/java/org/apache/avalon/phoenix/launcher
CommonsDaemon.java
Log:
commons-daemon support.
Need more work.
Revision Changes Path
1.2 +13 -12
jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/launcher/CommonsDaemon.java
Index: CommonsDaemon.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/launcher/CommonsDaemon.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CommonsDaemon.java 28 Feb 2002 15:50:18 -0000 1.1
+++ CommonsDaemon.java 28 Feb 2002 17:11:16 -0000 1.2
@@ -16,10 +16,10 @@
/**
* A frontend for Phoenix that starts it as a native service
- * using the Jakarta commons daemon.
+ * using the Jakarta commons-daemon.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Eung-ju Park</a>
- * @version $Revision: 1.1 $ $Date: 2002/02/28 15:50:18 $
+ * @version $Revision: 1.2 $ $Date: 2002/02/28 17:11:16 $
*/
public class CommonsDaemon
implements Daemon, Observer
@@ -70,39 +70,40 @@
{
if ( m_debugEnabled )
{
- System.out.println( "CommonsDaemon: restart requested." );
- System.out.flush();
+ log( "restart requested." );
}
m_controller.reload();
if ( m_debugEnabled )
{
- //Should never get here???
- System.out.println( "CommonsDaemon: restart completed." );
- System.out.flush();
+ log( "restart completed." );
}
}
else if ( command.equals( "shutdown" ) )
{
if ( m_debugEnabled )
{
- System.out.println( "CommonsDaemon: shutdown requested." );
- System.out.flush();
+ log( "shutdown requested." );
}
m_controller.shutdown();
if ( m_debugEnabled )
{
- //Should never get here???
- System.out.println( "CommonsDaemon: shutdown completed." );
- System.out.flush();
+ log( "shutdown completed." );
}
}
else
{
throw new IllegalArgumentException( "Unknown action " + command
);
}
+ }
+
+ private void log( final String message )
+ {
+ System.out.print( "CommonsDaemon: " );
+ System.out.println( message );
+ System.out.flush();
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>