Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2933 - development/main/depot/console/src/main/net/dpml/depot

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT dpml.net
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2933 - development/main/depot/console/src/main/net/dpml/depot
  • Date: Tue, 28 Jun 2005 14:39:41 -0400

Author: mcconnell AT dpml.net
Date: Tue Jun 28 14:39:41 2005
New Revision: 2933

Modified:
development/main/depot/console/src/main/net/dpml/depot/Main.java
Log:
Improve console command handling.

Modified: development/main/depot/console/src/main/net/dpml/depot/Main.java
==============================================================================
--- development/main/depot/console/src/main/net/dpml/depot/Main.java
(original)
+++ development/main/depot/console/src/main/net/dpml/depot/Main.java Tue
Jun 28 14:39:41 2005
@@ -97,7 +97,7 @@
if( help )
{
handleHelp();
- return;
+ exit();
}

boolean reset = isFlagPresent( args, "-reset" );
@@ -105,14 +105,14 @@
{
clearPreferences( Main.class );
clearPreferences( Transit.class );
- return;
+ exit();
}

boolean version = isFlagPresent( args, "-version" );
if( version )
{
handleVersion();
- return;
+ exit();
}

boolean debug = isFlagPresent( args, "-debug" );
@@ -134,7 +134,7 @@
String arg = args[i];
if( arg.equals( "-station" ) )
{
- System.setProperty( "dpml.logging.category", "station" );
+ System.setProperty( "dpml.logging.category", "depot.station"
);
break;
}
}
@@ -148,6 +148,7 @@
String arg = args[i];
if( arg.equals( "-get" ) )
{
+ System.setProperty( "dpml.logging.category", "depot.get" );
if( i+1 < args.length )
{
String path = args[i+1];
@@ -159,7 +160,7 @@
"Missing get parameter value.";
getLogger().error( error );
}
- return;
+ exit();
}
}

@@ -211,7 +212,7 @@
if( null == profile )
{
handleHelp();
- return;
+ exit();
}

termination = profile.getCommandPolicy();
@@ -288,10 +289,15 @@
getLogger().info( "startup completed in " + result[0] + "." +
result[1] + " seconds" );
if( termination )
{
- System.exit( 0 );
+ exit();
}
}

+ private static void exit()
+ {
+ System.exit( 0 );
+ }
+
private static Object resolveTargetObject(
ClassLoader parent, URI uri, String[] args, DepotProfile manager,
TransitModel model,
Logger logger, ApplicationProfile profile )
@@ -509,7 +515,6 @@
// Create a shutdown hook to trigger clean disposal of the
// controller
//
-

Runtime.getRuntime().addShutdownHook(
new Thread()
@@ -542,7 +547,8 @@
{
if( null == LOGGER )
{
- LOGGER = new LoggingAdapter( java.util.logging.Logger.getLogger(
"depot" ) );
+ String category = System.getProperty( "dpml.logging.category",
"depot" );
+ LOGGER = new LoggingAdapter( java.util.logging.Logger.getLogger(
category ) );
}
return LOGGER;
}



  • svn commit: r2933 - development/main/depot/console/src/main/net/dpml/depot, mcconnell, 06/28/2005

Archive powered by MHonArc 2.6.24.

Top of Page