Skip to Content.
Sympa Menu

notify-dpml - svn commit: r1180 - in development/main/transit: handler/src/main/net/dpml/transit plugin/etc/bin

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT netcompartner.com
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r1180 - in development/main/transit: handler/src/main/net/dpml/transit plugin/etc/bin
  • Date: Tue, 14 Dec 2004 19:08:39 +0100

Author: mcconnell
Date: Tue Dec 14 19:08:39 2004
New Revision: 1180

Modified:
development/main/transit/handler/src/main/net/dpml/transit/Main.java
development/main/transit/plugin/etc/bin/internal-cygwin.sh
development/main/transit/plugin/etc/bin/internal-unix.sh
development/main/transit/plugin/etc/bin/transit.bat
development/main/transit/plugin/etc/bin/transit.sh
Log:
Add an -Xbootstrap argument to the transit cli scripts and enhance the
bootstrap process with trace logging of what is actually happening.

Modified: development/main/transit/handler/src/main/net/dpml/transit/Main.java
==============================================================================
--- development/main/transit/handler/src/main/net/dpml/transit/Main.java
(original)
+++ development/main/transit/handler/src/main/net/dpml/transit/Main.java
Tue Dec 14 19:08:39 2004
@@ -81,16 +81,16 @@
}
}

- String[] arguments = collapseArgs( args );
+ //
+ // setup transit
+ //

Monitor monitor = new BootstrapMonitor( debug );
Transit transit = Transit.getInstance( monitor );
-
Adapter adapter = new ConsoleAdapter( debug );
RepositoryMonitor repoMonitor = new RepositoryMonitorAdapter(
adapter );
CacheMonitor cacheMonitor = new CacheMonitorAdapter( adapter );
NetworkMonitor netMonitor = new NetworkMonitorAdapter( adapter );
-
transit.getRepositoryMonitorRouter().addMonitor( repoMonitor );
transit.getCacheMonitorRouter().addMonitor( cacheMonitor );
transit.getNetworkMonitorRouter().addMonitor( netMonitor );
@@ -99,7 +99,44 @@
// get the bootstrap plugin
//

- String path = System.getProperty( BOOTSTRAP_URI_KEY );
+ String path = null;
+ for( int i=0; i < args.length; i++ )
+ {
+ String arg = args[i];
+ if( arg.startsWith( "-Xbootstrap=" ) )
+ {
+ path = arg.substring( "-Xbootstrap=".length() );
+
+ if( monitor.isTraceEnabled() )
+ {
+ final String message =
+ "using -Xbootstrap argument: ["
+ + path
+ + "]";
+ monitor.trace( message );
+ }
+ }
+ }
+
+ if( null == path )
+ {
+ path = System.getProperty( BOOTSTRAP_URI_KEY );
+
+ if( null != path )
+ {
+ if( monitor.isTraceEnabled() )
+ {
+ final String message =
+ "using system property "
+ + BOOTSTRAP_URI_KEY
+ + " with value: ["
+ + path
+ + "]";
+ monitor.trace( message );
+ }
+ }
+ }
+
if( null == path )
{
final String error =
@@ -111,6 +148,7 @@
throw new IllegalStateException( error );
}

+ String[] arguments = collapseArgs( args );
URI uri = Artifact.createArtifact( path ).toURI();
Monitor[] monitors = new Monitor[]{repoMonitor, cacheMonitor,
netMonitor};
Object[] params = new Object[]{monitors, arguments};
@@ -132,7 +170,15 @@
for( int i=0; i < args.length; i++ )
{
String arg = args[i];
- if( !"-Xdebug".equals( arg ) )
+ if( "-Xdebug".equals( arg ) )
+ {
+ final boolean ignorable = true;
+ }
+ else if( arg.startsWith( "Xbootstrap=" ) )
+ {
+ final boolean ignorable = true;
+ }
+ else
{
list.add( arg );
}

Modified: development/main/transit/plugin/etc/bin/internal-cygwin.sh
==============================================================================
--- development/main/transit/plugin/etc/bin/internal-cygwin.sh (original)
+++ development/main/transit/plugin/etc/bin/internal-cygwin.sh Tue Dec 14
19:08:39 2004
@@ -42,7 +42,7 @@
echo " Transit Arguments: $TRANSIT_ARGS $@"
echo ""

-ARGS="$TRANSIT_JVM_OPTS -Djava.protocol.handler.pkgs=net.dpml.transit
-Ddpml.transit.boostrap.uri=$TRANSIT_PLUGIN
\"-Djava.security.policy=$TRANSIT_SECURITY_POLICY\" $BOOTSTRAP_PLUGIN
-classpath \"$TRANSIT_CLASSPATH\" net.dpml.transit.Main $TRANSIT_ARGS $@"
+ARGS="$TRANSIT_JVM_OPTS -Djava.protocol.handler.pkgs=net.dpml.transit
-Ddpml.transit.boostrap.uri=$TRANSIT_PLUGIN
\"-Djava.security.policy=$TRANSIT_SECURITY_POLICY\" $BOOTSTRAP_PLUGIN
-classpath \"$TRANSIT_CLASSPATH\" net.dpml.transit.Main
-Xbootstrap=$TRANSIT_PLUGIN $TRANSIT_ARGS $@"

echo -n "$JAVA" >$TRANSIT_HOME/command-line.log
echo -n " " >>$TRANSIT_HOME/command-line.log

Modified: development/main/transit/plugin/etc/bin/internal-unix.sh
==============================================================================
--- development/main/transit/plugin/etc/bin/internal-unix.sh (original)
+++ development/main/transit/plugin/etc/bin/internal-unix.sh Tue Dec 14
19:08:39 2004
@@ -30,7 +30,7 @@

JAVA="$JAVA_HOME/bin/java"

-ARGS="$TRANSIT_JVM_OPTS -Djava.protocol.handler.pkgs=net.dpml.transit
-Ddpml.transit.boostrap.uri=$TRANSIT_PLUGIN
\"-Djava.security.policy=$TRANSIT_SECURITY_POLICY\" -classpath
\"$TRANSIT_CLASSPATH\" net.dpml.transit.Main $TRANSIT_ARGS $@"
+ARGS="$TRANSIT_JVM_OPTS -Djava.protocol.handler.pkgs=net.dpml.transit
-Ddpml.transit.boostrap.uri=$TRANSIT_PLUGIN
\"-Djava.security.policy=$TRANSIT_SECURITY_POLICY\" -classpath
\"$TRANSIT_CLASSPATH\" net.dpml.transit.Main -Xbootstrap=$TRANSIT_PLUGIN
$TRANSIT_ARGS $@"
echo -n "$JAVA" >$TRANSIT_HOME/command-line.log
echo -n " " >>$TRANSIT_HOME/command-line.log
echo "$ARGS" >>$TRANSIT_HOME/command-line.log

Modified: development/main/transit/plugin/etc/bin/transit.bat
==============================================================================
--- development/main/transit/plugin/etc/bin/transit.bat (original)
+++ development/main/transit/plugin/etc/bin/transit.bat Tue Dec 14 19:08:39
2004
@@ -22,7 +22,7 @@
set TRANSIT_CLASSPATH=%DPML_HOME%\transit\lib;@WINDOWS-CLI-CLASSPATH@

:RUN_METRO
-%JAVA% "%SECURITY_POLICY%" %TRANSIT_JVM_OPTS%
-Ddpml.transit.bootstrap.uri=%TRANSIT_PLUGIN% -classpath
"%TRANSIT_CLASSPATH%" net.dpml.transit.Main %CMD_LINE_ARGS%
+%JAVA% "%SECURITY_POLICY%" %TRANSIT_JVM_OPTS%
-Ddpml.transit.bootstrap.uri=%TRANSIT_PLUGIN% -classpath
"%TRANSIT_CLASSPATH%" net.dpml.transit.Main -Xbootstrap=%TRANSIT_PLUGIN%
%CMD_LINE_ARGS%
goto EndOfScript
:EndOfScript


Modified: development/main/transit/plugin/etc/bin/transit.sh
==============================================================================
--- development/main/transit/plugin/etc/bin/transit.sh (original)
+++ development/main/transit/plugin/etc/bin/transit.sh Tue Dec 14 19:08:39
2004
@@ -114,7 +114,7 @@
TRANSIT_CLASSPATH=@UNIX-CLI-CLASSPATH@

# Get the run cmd
-RUN_CMD="$JAVA_HOME/bin/java $JVM_OPTS
-Djava.protocol.handler.pkgs=net.dpml.transit $DEBUG $TRANSIT_JVM_OPTS
-classpath $TRANSIT_CLASSPATH net.dpml.transit.Main $ARGS"
+RUN_CMD="$JAVA_HOME/bin/java $JVM_OPTS
-Djava.protocol.handler.pkgs=net.dpml.transit $DEBUG $TRANSIT_JVM_OPTS
-classpath $TRANSIT_CLASSPATH net.dpml.transit.Main
-Xbootstrap=$TRANSIT_PLUGIN $ARGS"

echo "Using TRANSIT_HOME: $TRANSIT_HOME"
echo "Using JAVA_HOME: $JAVA_HOME"



  • svn commit: r1180 - in development/main/transit: handler/src/main/net/dpml/transit plugin/etc/bin, mcconnell, 12/14/2004

Archive powered by MHonArc 2.6.24.

Top of Page