Skip to Content.
Sympa Menu

notify-dpml - r1240 - in trunk/main: depot/core/src/main/net/dpml/depot station/console/src/main/net/dpml/station/console

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1240 - in trunk/main: depot/core/src/main/net/dpml/depot station/console/src/main/net/dpml/station/console
  • Date: Tue, 21 Mar 2006 06:49:35 +0100

Author: mcconnell
Date: 2006-03-21 06:49:27 +0100 (Tue, 21 Mar 2006)
New Revision: 1240

Modified:
trunk/main/depot/core/src/main/net/dpml/depot/Main.java

trunk/main/station/console/src/main/net/dpml/station/console/StationPlugin.java
Log:
debugging

Modified: trunk/main/depot/core/src/main/net/dpml/depot/Main.java
===================================================================
--- trunk/main/depot/core/src/main/net/dpml/depot/Main.java 2006-03-21
04:48:20 UTC (rev 1239)
+++ trunk/main/depot/core/src/main/net/dpml/depot/Main.java 2006-03-21
05:49:27 UTC (rev 1240)
@@ -157,10 +157,10 @@

private void handleStation( String[] arguments )
{
- String name = "station";
new File( Transit.DPML_DATA, "logs/station" ).mkdirs();
if( CLIHelper.isOptionPresent( arguments, "-server" ) )
{
+ String name = "station (server mode)";
String[] args = CLIHelper.consolidate( arguments, "-server" );
args = processSystemProperties( args );
String spec = "@DEPOT-STATION-SERVER-URI@";
@@ -168,6 +168,7 @@
}
else
{
+ String name = "station (console mode)";
String spec = "@DEPOT-STATION-URI@";
handlePlugin( name, spec, arguments, false );
}
@@ -198,7 +199,7 @@
TransitModel model, String command, String path, String[] args,
boolean waitFor )
{

- Logger logger = getLogger().getChildLogger( command );
+ Logger logger = getLogger();
if( m_debug )
{
Enumeration names = System.getProperties().propertyNames();
@@ -242,9 +243,9 @@
catch( Throwable e )
{
final String error =
- "Unable to deploy the ["
- + command
- + "] handler due to deployment failure.";
+ "Deloyment failure."
+ + "\nTarget: " + command
+ + "\n URI: " + path;
getLogger().error( error, e );
System.exit( 1 );
}

Modified:
trunk/main/station/console/src/main/net/dpml/station/console/StationPlugin.java
===================================================================
---
trunk/main/station/console/src/main/net/dpml/station/console/StationPlugin.java
2006-03-21 04:48:20 UTC (rev 1239)
+++
trunk/main/station/console/src/main/net/dpml/station/console/StationPlugin.java
2006-03-21 05:49:27 UTC (rev 1240)
@@ -446,6 +446,7 @@
*/
private void processStartup( CommandLine line ) throws Exception
{
+ getLogger().debug( "processing startup request" );
int port = getPortValue( line, Registry.REGISTRY_PORT );
if( null != getStation( port ) )
{
@@ -478,17 +479,13 @@
list.add( uri.toASCIIString() );
}
String[] args = (String[]) list.toArray( new String[0] );
- try
- {
- Runtime.getRuntime().exec( args, null );
- }
- catch( Throwable e )
- {
- final String error =
- "Station deployment failure.";
- getLogger().error( error, e );
- }
- getLogger().info( "Station started on port: " + port );
+
+ String message = "server startup command:";
+ String info = getRawArguments( message, args );
+ getLogger().debug( info );
+
+ Runtime.getRuntime().exec( args, null );
+ getLogger().info( "startup in process." );
}

private void processShutdown( Manager manager ) throws Exception
@@ -1266,6 +1263,21 @@
logger.debug( message );
}

+ private String getRawArguments( String message, String[] args )
+ {
+ StringBuffer buffer = new StringBuffer( message );
+ buffer.append( "\n command elements: " + args.length );
+ for( int i=0; i<args.length; i++ )
+ {
+ buffer.append(
+ "\n "
+ + ( i+1 )
+ + " "
+ + args[i] );
+ }
+ return buffer.toString();
+ }
+
private Station getStation( int port ) throws Exception
{
Registry registry = getLocalRegistry( port );




  • r1240 - in trunk/main: depot/core/src/main/net/dpml/depot station/console/src/main/net/dpml/station/console, mcconnell at BerliOS, 03/21/2006

Archive powered by MHonArc 2.6.24.

Top of Page