Skip to Content.
Sympa Menu

notify-dpml - r1933 - in trunk: central/site/src/docs/util central/site/src/docs/util/concepts main/metro/appliance/etc/xsds main/metro/appliance/src/main/dpml/station/info main/metro/appliance/src/main/net/dpml/station main/metro/part/src/main/dpml/appliance main/metro/part/src/main/net/dpml/appliance main/metro/part/src/main/net/dpml/runtime main/metro/sample main/metro/sample/etc main/metro/station/etc/prefs/plans main/metro/station/src/main/dpml/station/console main/transit/core main/transit/core/src/main/dpml/util

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: r1933 - in trunk: central/site/src/docs/util central/site/src/docs/util/concepts main/metro/appliance/etc/xsds main/metro/appliance/src/main/dpml/station/info main/metro/appliance/src/main/net/dpml/station main/metro/part/src/main/dpml/appliance main/metro/part/src/main/net/dpml/appliance main/metro/part/src/main/net/dpml/runtime main/metro/sample main/metro/sample/etc main/metro/station/etc/prefs/plans main/metro/station/src/main/dpml/station/console main/transit/core main/transit/core/src/main/dpml/util
  • Date: Sun, 25 Mar 2007 06:23:44 +0200

Author: mcconnell
Date: 2007-03-25 06:23:42 +0200 (Sun, 25 Mar 2007)
New Revision: 1933

Added:
trunk/main/metro/sample/etc/appliance.xml
trunk/main/metro/sample/etc/plan.xml
Modified:
trunk/central/site/src/docs/util/concepts/index.xml
trunk/central/site/src/docs/util/index.xml
trunk/main/metro/appliance/etc/xsds/appliance.xsd
trunk/main/metro/appliance/etc/xsds/plan.xsd

trunk/main/metro/appliance/src/main/dpml/station/info/ApplianceDescriptor.java
trunk/main/metro/appliance/src/main/dpml/station/info/EntryDescriptor.java

trunk/main/metro/appliance/src/main/net/dpml/station/ApplianceContentHandler.java

trunk/main/metro/appliance/src/main/net/dpml/station/CompositeAppliance.java
trunk/main/metro/appliance/src/main/net/dpml/station/Station.java
trunk/main/metro/part/src/main/dpml/appliance/AbstractAppliance.java
trunk/main/metro/part/src/main/dpml/appliance/StandardAppliance.java
trunk/main/metro/part/src/main/net/dpml/appliance/Appliance.java
trunk/main/metro/part/src/main/net/dpml/runtime/Provider.java
trunk/main/metro/part/src/main/net/dpml/runtime/StandardProvider.java
trunk/main/metro/sample/project.xml
trunk/main/metro/station/etc/prefs/plans/default.plan
trunk/main/metro/station/src/main/dpml/station/console/Main.java
trunk/main/transit/core/build.xml
trunk/main/transit/core/src/main/dpml/util/FederatingClassLoader.java
Log:
(1) general enhancement to the station and appliance concerns
(2) resolved bug in FederatingClassLoader re. null value in RMI classpath
string

Modified: trunk/central/site/src/docs/util/concepts/index.xml
===================================================================
--- trunk/central/site/src/docs/util/concepts/index.xml 2007-03-25 00:01:14
UTC (rev 1932)
+++ trunk/central/site/src/docs/util/concepts/index.xml 2007-03-25 04:23:42
UTC (rev 1933)
@@ -28,12 +28,24 @@

<section name="DPML Utilities">

+ <subsection name="Index">
+
<p>
- The utilities package includes a commandline processor
- used within the DPML commandline handlers. The CLI
- package has no dependencies and is suitable for use in
- general CLI based applications.
+ The utilities package includes a a number of lower-level
+ utilities used across the DPML application suite. These
+ include the <a href="../transit/index.html">Transit</a>
+ resource management services, the <a
href="../depot/index.html">Depot</a>
+ build automation facilities, and a <a
href="../command/index.html">CLI</a>
+ processor used withing several of the DPML applications.
</p>
+
+ <ul>
+ <li>the <a href="../transit/index.html">Transit</a> resource
management layer</li>
+ <li>the <a href="../depot/index.html">Depot</a> build automation
tools</li>
+ <li>and common <a href="../command/index.html">CLI</a>
utilities</li>
+ </ul>
+
+ </subsection>

</section>


Modified: trunk/central/site/src/docs/util/index.xml
===================================================================
--- trunk/central/site/src/docs/util/index.xml 2007-03-25 00:01:14 UTC (rev
1932)
+++ trunk/central/site/src/docs/util/index.xml 2007-03-25 04:23:42 UTC (rev
1933)
@@ -28,13 +28,6 @@

<section name="Common Utilities">

- <p>
- The utilities package includes a commandline processor
- used within the DPML commandline handlers. The CLI
- package has no dependencies and is suitable for use in
- general CLI based applications.
- </p>
-
</section>

</body>

Modified: trunk/main/metro/appliance/etc/xsds/appliance.xsd
===================================================================
--- trunk/main/metro/appliance/etc/xsds/appliance.xsd 2007-03-25 00:01:14
UTC (rev 1932)
+++ trunk/main/metro/appliance/etc/xsds/appliance.xsd 2007-03-25 04:23:42
UTC (rev 1933)
@@ -78,7 +78,15 @@
<attribute name="value" type="string"/>
</complexType>

+ <complexType name="ParamType">
+ <attribute name="key" type="string"/>
+ <attribute name="value" type="string"/>
+ </complexType>
+
<complexType name="CodebaseType">
+ <sequence>
+ <element name="param" type="this:ParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ </sequence>
<attribute name="uri" type="anyURI"/>
</complexType>


Modified: trunk/main/metro/appliance/etc/xsds/plan.xsd
===================================================================
--- trunk/main/metro/appliance/etc/xsds/plan.xsd 2007-03-25 00:01:14
UTC (rev 1932)
+++ trunk/main/metro/appliance/etc/xsds/plan.xsd 2007-03-25 04:23:42
UTC (rev 1933)
@@ -30,8 +30,16 @@
</complexType>

<complexType name="EntryType">
+ <sequence>
+ <element name="param" type="this:ParamType" minOccurs="0"
maxOccurs="unbounded"/>
+ </sequence>
<attribute name="uri" type="anyURI" use="required"/>
<attribute name="key" type="string" use="required"/>
</complexType>

+ <complexType name="ParamType">
+ <attribute name="key" type="string" use="required"/>
+ <attribute name="value" type="string" use="required"/>
+ </complexType>
+
</schema>

Modified:
trunk/main/metro/appliance/src/main/dpml/station/info/ApplianceDescriptor.java
===================================================================
---
trunk/main/metro/appliance/src/main/dpml/station/info/ApplianceDescriptor.java
2007-03-25 00:01:14 UTC (rev 1932)
+++
trunk/main/metro/appliance/src/main/dpml/station/info/ApplianceDescriptor.java
2007-03-25 04:23:42 UTC (rev 1933)
@@ -247,9 +247,22 @@
"Mising uri attribute.";
throw new DecodingException( error, element );
}
- else
+
+ Element[] params = ElementHelper.getChildren( element, "param" );
+ for( int i=0; i<params.length; i++ )
{
- return URI.create( spec );
+ Element e = params[i];
+ String key = ElementHelper.getAttribute( e, "key", null,
resolver );
+ String value = ElementHelper.getAttribute( e, "value", null,
resolver );
+ if( i==0 )
+ {
+ spec = spec + "?" + key + "=" + value;
+ }
+ else
+ {
+ spec = spec + "&" + key + "=" + value;
+ }
}
+ return URI.create( spec );
}
}

Modified:
trunk/main/metro/appliance/src/main/dpml/station/info/EntryDescriptor.java
===================================================================
---
trunk/main/metro/appliance/src/main/dpml/station/info/EntryDescriptor.java
2007-03-25 00:01:14 UTC (rev 1932)
+++
trunk/main/metro/appliance/src/main/dpml/station/info/EntryDescriptor.java
2007-03-25 04:23:42 UTC (rev 1933)
@@ -50,13 +50,29 @@
throw new DecodingException( error, element );
}
String spec = ElementHelper.getAttribute( element, "uri", null,
resolver );
- m_uri = URI.create( spec );
- if( null == m_uri )
+ if( null == spec )
{
final String error =
"Missing 'uri' attribute in entry descriptor.";
throw new DecodingException( error, element );
}
+
+ Element[] params = ElementHelper.getChildren( element, "param" );
+ for( int i=0; i<params.length; i++ )
+ {
+ Element e = params[i];
+ String key = ElementHelper.getAttribute( e, "key", null,
resolver );
+ String value = ElementHelper.getAttribute( e, "value", null,
resolver );
+ if( i==0 )
+ {
+ spec = spec + "?" + key + "=" + value;
+ }
+ else
+ {
+ spec = spec + "&" + key + "=" + value;
+ }
+ }
+ m_uri = URI.create( spec );
}

/**

Modified:
trunk/main/metro/appliance/src/main/net/dpml/station/ApplianceContentHandler.java
===================================================================
---
trunk/main/metro/appliance/src/main/net/dpml/station/ApplianceContentHandler.java
2007-03-25 00:01:14 UTC (rev 1932)
+++
trunk/main/metro/appliance/src/main/net/dpml/station/ApplianceContentHandler.java
2007-03-25 04:23:42 UTC (rev 1933)
@@ -61,6 +61,7 @@
import net.dpml.appliance.ApplianceManager;
import net.dpml.appliance.ApplianceContentManager;
import net.dpml.appliance.ApplianceFactory;
+
import dpml.station.info.ApplianceDescriptor;
import dpml.station.info.InfoDescriptor;
import dpml.station.info.ProcessDescriptor;

Modified:
trunk/main/metro/appliance/src/main/net/dpml/station/CompositeAppliance.java
===================================================================
---
trunk/main/metro/appliance/src/main/net/dpml/station/CompositeAppliance.java
2007-03-25 00:01:14 UTC (rev 1932)
+++
trunk/main/metro/appliance/src/main/net/dpml/station/CompositeAppliance.java
2007-03-25 04:23:42 UTC (rev 1933)
@@ -18,6 +18,8 @@

package net.dpml.station;

+import dpml.state.NullState;
+
import dpml.station.info.PlanDescriptor;
import dpml.station.info.EntryDescriptor;

@@ -41,6 +43,8 @@

import net.dpml.runtime.Status;

+import net.dpml.state.State;
+
import net.dpml.transit.Artifact;
import net.dpml.util.Logger;

@@ -92,6 +96,33 @@
}

/**
+ * Return the current state of the instance.
+ * @return the current state
+ */
+ public State getState() throws RemoteException
+ {
+ return new NullState();
+ }
+
+ /**
+ * Returns the plan name.
+ * @return the name
+ */
+ public String getName()
+ {
+ return m_descriptor.getName();
+ }
+
+ /**
+ * Returns the plan title.
+ * @return the title
+ */
+ public String getTitle()
+ {
+ return m_descriptor.getTitle();
+ }
+
+ /**
* Returns the plan URI as a string.
* @return the codebase uri
*/
@@ -100,6 +131,16 @@
return m_descriptor.getCodebaseURI().toASCIIString();
}

+ /**
+ * Return an array of subsidiary appliance instances managed by this
appliance.
+ * @return an array of subsidiary appliance instances
+ * @exception RemoteException if a RMI error occurs
+ */
+ public Appliance[] getChildren()
+ {
+ return m_list.toArray( new Appliance[0] );
+ }
+
private String getQualifiedName( String partition, String key )
{
if( null == partition )

Modified: trunk/main/metro/appliance/src/main/net/dpml/station/Station.java
===================================================================
--- trunk/main/metro/appliance/src/main/net/dpml/station/Station.java
2007-03-25 00:01:14 UTC (rev 1932)
+++ trunk/main/metro/appliance/src/main/net/dpml/station/Station.java
2007-03-25 04:23:42 UTC (rev 1933)
@@ -21,13 +21,16 @@
import java.rmi.Remote;
import java.rmi.RemoteException;

+import net.dpml.appliance.Appliance;
+
/**
* Station interface.
*
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
* @version @PROJECT-VERSION@
*/
-public interface Station extends Remote
+//public interface Station extends Remote
+public interface Station extends Appliance
{
static final String STATION_CONNECTOR_KEY = "dpml.station.key";
static final String STATION_JMX_URI_KEY = "dpml.station.jmx.uri";

Modified: trunk/main/metro/part/src/main/dpml/appliance/AbstractAppliance.java
===================================================================
--- trunk/main/metro/part/src/main/dpml/appliance/AbstractAppliance.java
2007-03-25 00:01:14 UTC (rev 1932)
+++ trunk/main/metro/part/src/main/dpml/appliance/AbstractAppliance.java
2007-03-25 04:23:42 UTC (rev 1933)
@@ -121,6 +121,15 @@
}

/**
+ * Return an array of subsidiary appliance instances managed by this
appliance.
+ * @return an array of subsidiary appliance instances
+ */
+ public Appliance[] getChildren()
+ {
+ return new Appliance[0];
+ }
+
+ /**
* Add a listener to the component.
* @param listener the component listener
*/

Modified: trunk/main/metro/part/src/main/dpml/appliance/StandardAppliance.java
===================================================================
--- trunk/main/metro/part/src/main/dpml/appliance/StandardAppliance.java
2007-03-25 00:01:14 UTC (rev 1932)
+++ trunk/main/metro/part/src/main/dpml/appliance/StandardAppliance.java
2007-03-25 04:23:42 UTC (rev 1933)
@@ -18,6 +18,8 @@

package dpml.appliance;

+import dpml.state.NullState;
+
import java.io.IOException;
import java.lang.management.ManagementFactory;
import java.net.URI;
@@ -82,6 +84,27 @@
}

/**
+ * Return the current state of the instance.
+ * @return the current state
+ */
+ public State getState() throws RemoteException
+ {
+ if( null != m_provider )
+ {
+ return m_provider.getState();
+ }
+ else
+ {
+ return new NullState();
+ }
+ }
+
+ public String getName() throws RemoteException
+ {
+ return m_component.getName();
+ }
+
+ /**
* Return a value assignable to the supplied remote type or null if the
type
* cannot be resolved from this strategy.
* @param c the target class

Modified: trunk/main/metro/part/src/main/net/dpml/appliance/Appliance.java
===================================================================
--- trunk/main/metro/part/src/main/net/dpml/appliance/Appliance.java
2007-03-25 00:01:14 UTC (rev 1932)
+++ trunk/main/metro/part/src/main/net/dpml/appliance/Appliance.java
2007-03-25 04:23:42 UTC (rev 1933)
@@ -23,6 +23,8 @@
import java.rmi.RemoteException;
import java.util.concurrent.TimeUnit;

+import net.dpml.state.State;
+
/**
* Appliance interface. An appliance represents a component or component
collection
* that can be comissioned and decommissioned.
@@ -33,6 +35,12 @@
public interface Appliance extends Remote
{
/**
+ * Return the current state of the instance.
+ * @return the current state
+ */
+ State getState() throws RemoteException;
+
+ /**
* Add an appliance listener to the appliance.
* @param listener the appliance listener
* @exception RemoteException if a RMI error occurs
@@ -57,5 +65,18 @@
* @exception RemoteException if a RMI error occurs
*/
void decommission() throws RemoteException;
+
+ /**
+ * Return an array of subsidiary appliance instances managed by this
appliance.
+ * @return an array of subsidiary appliance instances
+ * @exception RemoteException if a RMI error occurs
+ */
+ Appliance[] getChildren() throws RemoteException;
+
+ String getName() throws RemoteException;
+
+ String getCodebaseURI() throws RemoteException;
+
+ boolean isCommissioned() throws RemoteException;
}


Modified: trunk/main/metro/part/src/main/net/dpml/runtime/Provider.java
===================================================================
--- trunk/main/metro/part/src/main/net/dpml/runtime/Provider.java
2007-03-25 00:01:14 UTC (rev 1932)
+++ trunk/main/metro/part/src/main/net/dpml/runtime/Provider.java
2007-03-25 04:23:42 UTC (rev 1933)
@@ -18,6 +18,7 @@

package net.dpml.runtime;

+import net.dpml.state.State;
import net.dpml.state.StateListener;

/**
@@ -39,6 +40,12 @@
* @param listener the state listener
*/
void removeStateListener( final StateListener listener );
+
+ /**
+ * Return the current state of the instance.
+ * @return the current state
+ */
+ State getState();

/**
* Return a fully commissioned instance.

Modified:
trunk/main/metro/part/src/main/net/dpml/runtime/StandardProvider.java
===================================================================
--- trunk/main/metro/part/src/main/net/dpml/runtime/StandardProvider.java
2007-03-25 00:01:14 UTC (rev 1932)
+++ trunk/main/metro/part/src/main/net/dpml/runtime/StandardProvider.java
2007-03-25 04:23:42 UTC (rev 1933)
@@ -99,6 +99,15 @@
m_instance = newInstance();
}
}
+
+ /**
+ * Return the current state of the instance.
+ * @return the current state
+ */
+ public State getState()
+ {
+ return m_machine.getState();
+ }

/**
* Add a state change listener to the state machine.

Added: trunk/main/metro/sample/etc/appliance.xml
===================================================================
--- trunk/main/metro/sample/etc/appliance.xml 2007-03-25 00:01:14 UTC (rev
1932)
+++ trunk/main/metro/sample/etc/appliance.xml 2007-03-25 04:23:42 UTC (rev
1933)
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+
+<appliance xmlns="dpml:appliance">
+
+ <info name="demo"/>
+
+ <process startup="0" shutdown="0">
+ <environment>
+ <variable name="FOO" value="BAR"/>
+ </environment>
+ <properties>
+ <property name="foo" value="bar"/>
+ </properties>
+ </process>
+
+ <codebase uri="link:part:dpml/metro/dpml-metro-sample">
+ <param key="message" value="Hello%20World"/>
+ <param key="port" value="1024"/>
+ </codebase>
+
+</appliance>

Added: trunk/main/metro/sample/etc/plan.xml
===================================================================
--- trunk/main/metro/sample/etc/plan.xml 2007-03-25 00:01:14 UTC (rev
1932)
+++ trunk/main/metro/sample/etc/plan.xml 2007-03-25 04:23:42 UTC (rev
1933)
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+
+<plan xmlns="dpml:plan" name="station" title="DPML Station Deployment Plan">
+
+ <entry key="demo" uri="link:appliance:dpml/metro/dpml-metro-sample"/>
+
+</plan>

Modified: trunk/main/metro/sample/project.xml
===================================================================
--- trunk/main/metro/sample/project.xml 2007-03-25 00:01:14 UTC (rev 1932)
+++ trunk/main/metro/sample/project.xml 2007-03-25 04:23:42 UTC (rev 1933)
@@ -7,6 +7,8 @@
<types>
<type id="jar"/>
<type id="part" source="etc/component.xml" alias="true"/>
+ <type id="plan" source="etc/plan.xml" alias="true"/>
+ <type id="appliance" source="etc/appliance.xml" alias="true"/>
</types>

<dependencies>

Modified: trunk/main/metro/station/etc/prefs/plans/default.plan
===================================================================
--- trunk/main/metro/station/etc/prefs/plans/default.plan 2007-03-25
00:01:14 UTC (rev 1932)
+++ trunk/main/metro/station/etc/prefs/plans/default.plan 2007-03-25
04:23:42 UTC (rev 1933)
@@ -15,9 +15,9 @@
Example:

<plan xmlns="dpml:plan" name="demo" title="Station Deployment Plan Demo">
- <entry name="foo" uri="link:appliance:dpml/metro/demo"/>
- <entry name="bar" uri="link:part:dpml/lang/dpml-lang-sample"/>
- <entry name="toto"
uri="link:part:dpml/lang/dpml-lang-sample?message=My%20Scenario,port=999"/>
+ <entry key="foo" uri="link:appliance:dpml/metro/demo"/>
+ <entry key="bar" uri="link:part:dpml/lang/dpml-lang-sample"/>
+ <entry key="toto"
uri="link:part:dpml/metro/dpml-metro-sample?message=My%20Scenario&amp;port=999"/>
</plan>

-->

Modified: trunk/main/metro/station/src/main/dpml/station/console/Main.java
===================================================================
--- trunk/main/metro/station/src/main/dpml/station/console/Main.java
2007-03-25 00:01:14 UTC (rev 1932)
+++ trunk/main/metro/station/src/main/dpml/station/console/Main.java
2007-03-25 04:23:42 UTC (rev 1933)
@@ -102,6 +102,8 @@

import net.dpml.station.Station;

+import net.dpml.state.State;
+
import net.dpml.transit.Artifact;
import net.dpml.transit.InvalidArtifactException;
import net.dpml.transit.ContentHandler;
@@ -135,6 +137,7 @@
private final Logger m_logger;
private Appliance m_plan;
private Thread m_thread;
+
//private JMXServiceURL m_jmx;
//private JMXConnectorServer m_server;

@@ -144,32 +147,6 @@
* type of the target application. Normally this plugin is activated as
a
* consequence of invoking the <tt>metro</tt> commandline handler (which
is
* the default haviour of the <tt>station</tt> when deployment local
processes).
- * The following command list help about the <tt>metro</tt> commandline
handler:
- * <pre>$ metro help
-Usage:
-metro <uri> [-server] | -help
-options
- <uri> Application codebase part uri.
- -command Enables command mode.
- -help Prints command help and exits.
- -version Prints version info and exits.
- * </pre>
- * An example commandline and resulting log of an application launch
- * using <tt>metro</tt> is show below:
- * <pre>
-$ metro -command link:part:dpml/metro/dpml-metro-sample
-
-[2756 ] [INFO ] (dpml.metro): commissioning hello
-[2756 ] [INFO ] (hello): pid: [2756]
-[2756 ] [INFO ] (hello): message: Hello
-[2756 ] [INFO ] (hello): port: 0
-[2756 ] [INFO ] (hello): target:
artifact:jar:dpml/metro/dpml-metro-sample#SNAPSHOT
-[2756 ] [INFO ] (hello): starting
-[2756 ] [INFO ] (hello): started
-[2756 ] [INFO ] (dpml.metro): decommissioning hello
-[2756 ] [INFO ] (hello): stopping
-[2756 ] [INFO ] (hello): stopped
- * </pre>
*
* @param logger the assigned logging channel
* @exception Exception if an error occurs
@@ -227,6 +204,142 @@
}
}

+ /**
+ * Add an appliance listener to the appliance.
+ * @param listener the appliance listener
+ * @exception RemoteException if a RMI error occurs
+ */
+ public void addApplianceListener( ApplianceListener listener ) throws
RemoteException
+ {
+ if( null == m_plan )
+ {
+ throw new IllegalStateException( "plan" );
+ }
+ synchronized( m_plan )
+ {
+ m_plan.addApplianceListener( listener );
+ }
+ }
+
+ /**
+ * Remove an appliance listener from the appliance.
+ * @param listener the appliance listener
+ * @exception RemoteException if a RMI error occurs
+ */
+ public void removeApplianceListener( ApplianceListener listener ) throws
RemoteException
+ {
+ if( null == m_plan )
+ {
+ throw new IllegalStateException( "plan" );
+ }
+ synchronized( m_plan )
+ {
+ m_plan.removeApplianceListener( listener );
+ }
+ }
+
+ /**
+ * Return the current state of the instance.
+ * @return the current state
+ */
+ public State getState() throws RemoteException
+ {
+ if( null == m_plan )
+ {
+ throw new IllegalStateException( "plan" );
+ }
+ synchronized( m_plan )
+ {
+ return m_plan.getState();
+ }
+ }
+
+ /**
+ * Commission the appliance.
+ * @exception IOException if a I/O error occurs
+ */
+ public void commission() throws IOException
+ {
+ if( null == m_plan )
+ {
+ throw new IllegalStateException( "plan" );
+ }
+ synchronized( m_plan )
+ {
+ m_plan.commission();
+ }
+ }
+
+ /**
+ * Decommission the appliance.
+ * @exception RemoteException if a RMI error occurs
+ */
+ public void decommission() throws RemoteException
+ {
+ if( null == m_plan )
+ {
+ throw new IllegalStateException( "plan" );
+ }
+ synchronized( m_plan )
+ {
+ m_plan.decommission();
+ }
+ }
+
+ /**
+ * Return an array of subsidiary appliance instances managed by this
appliance.
+ * @return an array of subsidiary appliance instances
+ * @exception RemoteException if a RMI error occurs
+ */
+ public Appliance[] getChildren() throws RemoteException
+ {
+ if( null == m_plan )
+ {
+ throw new IllegalStateException( "plan" );
+ }
+ synchronized( m_plan )
+ {
+ return m_plan.getChildren();
+ }
+ }
+
+ /**
+ * Returns the plan name.
+ * @return the name
+ */
+ public String getName() throws RemoteException
+ {
+ if( null == m_plan )
+ {
+ throw new IllegalStateException( "plan" );
+ }
+ return m_plan.getName();
+ }
+
+ public String getCodebaseURI() throws RemoteException
+ {
+ if( null == m_plan )
+ {
+ throw new IllegalStateException( "plan" );
+ }
+ synchronized( m_plan )
+ {
+ return m_plan.getCodebaseURI();
+ }
+ }
+
+ public boolean isCommissioned() throws RemoteException
+ {
+ if( null == m_plan )
+ {
+ throw new IllegalStateException( "plan" );
+ }
+ synchronized( m_plan )
+ {
+ return m_plan.isCommissioned();
+ }
+ }
+
private int execute( String... args ) throws Exception
{
String name = System.getProperty( STATION_CONNECTOR_KEY,
STATION_CONNECTOR_VALUE );
@@ -412,9 +525,31 @@
try
{
Station station = getStation( port );
- if( getLogger().isInfoEnabled() )
+ System.out.println( "Station running on port [" + port + "]"
);
+ System.out.println( "Codebase: " + station.getCodebaseURI()
);
+
+ Appliance[] children = station.getChildren();
+ int n = children.length;
+
+ System.out.println( "Entries: " + children.length );
+
+ if( n > 0 )
{
- getLogger().info( "Station running on port [" + port +
"]" );
+ System.out.println( "" );
+ int i=1;
+ for( Appliance appliance : children )
+ {
+ System.out.println(
+ "("
+ + i
+ + ") "
+ + appliance.getName()
+ + " ["
+ + appliance.getState().getName()
+ + "] "
+ + appliance.getCodebaseURI()
+ );
+ }
}
}
catch( StationNotBoundException e )

Modified: trunk/main/transit/core/build.xml
===================================================================
--- trunk/main/transit/core/build.xml 2007-03-25 00:01:14 UTC (rev 1932)
+++ trunk/main/transit/core/build.xml 2007-03-25 04:23:42 UTC (rev 1933)
@@ -17,11 +17,11 @@
</copy>
<echo>

#----------------------------------------------------------------------------------
-# Updating Shared Lib. ${dpml.share}/lib
+# Updating Shared Lib. ${dpml.share}/lib/ext

#----------------------------------------------------------------------------------
</echo>
<mkdir dir="${dpml.share}/lib/ext"/>
- <copy preservelastmodified="true"
toFile="${dpml.share}/lib/${project.name}.jar"
+ <copy preservelastmodified="true"
toFile="${dpml.share}/lib/ext/${project.name}.jar"
file="${project.deliverable.jar.path}" overwrite="true"/>
</target>


Modified:
trunk/main/transit/core/src/main/dpml/util/FederatingClassLoader.java
===================================================================
--- trunk/main/transit/core/src/main/dpml/util/FederatingClassLoader.java
2007-03-25 00:01:14 UTC (rev 1932)
+++ trunk/main/transit/core/src/main/dpml/util/FederatingClassLoader.java
2007-03-25 04:23:42 UTC (rev 1933)
@@ -140,9 +140,16 @@
String codebase, String[] interfaces, ClassLoader defaultLoader )
throws MalformedURLException, ClassNotFoundException
{
- return m_delegate.loadProxyClass( codebase, interfaces,
defaultLoader );
+ try
+ {
+ return m_delegate.loadProxyClass( codebase, interfaces,
defaultLoader );
+ }
+ catch( MalformedURLException mue )
+ {
+ throw mue;
+ }
}
-
+
/**
* Provides the implementation for
* {@link RMIClassLoader#getClassLoader(String)}.
@@ -298,7 +305,7 @@
{
if( urls.length == 0 )
{
- return null;
+ return "";
}
else if( urls.length == 1 )
{




  • r1933 - in trunk: central/site/src/docs/util central/site/src/docs/util/concepts main/metro/appliance/etc/xsds main/metro/appliance/src/main/dpml/station/info main/metro/appliance/src/main/net/dpml/station main/metro/part/src/main/dpml/appliance main/metro/part/src/main/net/dpml/appliance main/metro/part/src/main/net/dpml/runtime main/metro/sample main/metro/sample/etc main/metro/station/etc/prefs/plans main/metro/station/src/main/dpml/station/console main/transit/core main/transit/core/src/main/dpml/util, mcconnell at BerliOS, 03/25/2007

Archive powered by MHonArc 2.6.24.

Top of Page