Skip to Content.
Sympa Menu

notify-dpml - r1880 - in trunk/central/site/src/docs: . about depot/tasks transit transit/concepts transit/config transit/technical transit/tutorials 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: r1880 - in trunk/central/site/src/docs: . about depot/tasks transit transit/concepts transit/config transit/technical transit/tutorials util
  • Date: Wed, 7 Mar 2007 03:16:49 +0100

Author: mcconnell
Date: 2007-03-07 03:16:46 +0100 (Wed, 07 Mar 2007)
New Revision: 1880

Added:
trunk/central/site/src/docs/depot/tasks/get.xml
trunk/central/site/src/docs/depot/tasks/import.xml
trunk/central/site/src/docs/transit/concepts/handlers.xml
Removed:
trunk/central/site/src/docs/transit/cli/
trunk/central/site/src/docs/transit/tasks/
trunk/central/site/src/docs/transit/technical/registry.xml
Modified:
trunk/central/site/src/docs/about/index.xml
trunk/central/site/src/docs/depot/tasks/navigation.xml
trunk/central/site/src/docs/index.xml
trunk/central/site/src/docs/navigation.xml
trunk/central/site/src/docs/transit/concepts/index.xml
trunk/central/site/src/docs/transit/config/index.xml
trunk/central/site/src/docs/transit/navigation.xml
trunk/central/site/src/docs/transit/technical/navigation.xml
trunk/central/site/src/docs/transit/tutorials/overview.xml
trunk/central/site/src/docs/util/navigation.xml
Log:
start on doc synchronization

Modified: trunk/central/site/src/docs/about/index.xml
===================================================================
--- trunk/central/site/src/docs/about/index.xml 2007-03-05 05:12:27 UTC (rev
1879)
+++ trunk/central/site/src/docs/about/index.xml 2007-03-07 02:16:46 UTC (rev
1880)
@@ -33,20 +33,15 @@

<ul>
<li>
- <a href="../transit/index.html">Transit</a> resource management
framework.
- </li>
- <li>
- <a href="../depot/index.html">Depot</a> tools
- for build automation in complex multi-project environments.
- </li>
- <li>
<a href="../metro/index.html">Metro</a> context-driven IOC
runtime container.
</li>
<li>
<a href="../station/index.html">Station</a> multi-appplication
management system.
</li>
<li>
- <a href="../util/index.html">Util</a> supporting utilities.
+ <a href="../util/index.html">Util</a> supporting utilities
including the
+ <a href="../util/transit/index.html">Transit</a> resource
management system and
+ <a href="../util/depot/index.html">Depot</a> build tool.
</li>
</ul>


Copied: trunk/central/site/src/docs/depot/tasks/get.xml (from rev 1860,
trunk/central/site/src/docs/transit/tasks/get.xml)

Copied: trunk/central/site/src/docs/depot/tasks/import.xml (from rev 1860,
trunk/central/site/src/docs/transit/tasks/import.xml)

Modified: trunk/central/site/src/docs/depot/tasks/navigation.xml
===================================================================
--- trunk/central/site/src/docs/depot/tasks/navigation.xml 2007-03-05
05:12:27 UTC (rev 1879)
+++ trunk/central/site/src/docs/depot/tasks/navigation.xml 2007-03-07
02:16:46 UTC (rev 1880)
@@ -25,9 +25,11 @@
<body>

<menu>
+ <item name="Import" href="import.html"/>
<item name="Init" href="init.html"/>
<item name="Install" href="install.html"/>
<item name="JavaDoc" href="javadoc.html"/>
+ <item name="Get" href="get.html"/>
<item name="Plugin" href="plugin.html"/>
<item name="Prepare" href="prepare.html"/>
<item name="Property" href="property.html"/>

Modified: trunk/central/site/src/docs/index.xml
===================================================================
--- trunk/central/site/src/docs/index.xml 2007-03-05 05:12:27 UTC (rev
1879)
+++ trunk/central/site/src/docs/index.xml 2007-03-07 02:16:46 UTC (rev
1880)
@@ -31,7 +31,7 @@

<ul>
<li>
- <a href="transit/index.html">Transit</a> resource management
framework.
+ <a href="util/transit/index.html">Transit</a> resource
management framework.
</li>
<li>
<a href="depot/index.html">Depot</a> tools

Modified: trunk/central/site/src/docs/navigation.xml
===================================================================
--- trunk/central/site/src/docs/navigation.xml 2007-03-05 05:12:27 UTC (rev
1879)
+++ trunk/central/site/src/docs/navigation.xml 2007-03-07 02:16:46 UTC (rev
1880)
@@ -31,7 +31,7 @@
<item name="Station" href="station/concepts/index.html"/>
<item name="Metro" href="metro/concepts/index.html"/>
<item name="Depot" href="depot/concepts/index.html"/>
- <item name="Transit" href="transit/concepts/index.html"/>
+ <!--<item name="Transit" href="transit/concepts/index.html"/>-->
</links>

<menu>

Added: trunk/central/site/src/docs/transit/concepts/handlers.xml
===================================================================
--- trunk/central/site/src/docs/transit/concepts/handlers.xml 2007-03-05
05:12:27 UTC (rev 1879)
+++ trunk/central/site/src/docs/transit/concepts/handlers.xml 2007-03-07
02:16:46 UTC (rev 1880)
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ Copyright 2004-2006 Stephen McConnell
+ Copyright 2005 David Leangen
+ Copyright 2004 Niclas Hedhman
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.dpml.net/central/about/legal/
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied.
+
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<document>
+ <properties>
+ <author email="mcconnell AT dpml.net">Stephen McConnell</author>
+ <author email="niclas AT hedhman.org">Niclas Hedhman</author>
+ <author email="david.leangen AT konova.com">David Leangen</author>
+ <title>DPML Transit Plugins</title>
+ </properties>
+
+ <body>
+
+ <section name="Plugin Management">
+
+ <p>
+ In addition to the structural classloader information - the plugin
file
+ may contain the declaration of a main class or an internal resource
and
+ namespace. The resource path information is a special case used
within the
+ Depot build system to support dynamic task loading. The main class
+ declaration is the entry point for classic plugin class loading
relative
+ to an established classloader.
+ </p>
+
+ <p>
+ The Transit repository service provides support for class creation
and
+ object instantiation. Class creation is typically used by
applications
+ that handle a particular semantics concerning a plugin model whereas
+ the Transit object instantiation provides a simple but flexible model
+ suitable for control over selectable sub-system strategies (e.g. the
+ loading of a logging system or application runtime).
+ </p>
+
+ <p>
+ The following code fragments demonstrates the creation of a plugin
instance
+ using Transit's standard plugin loader.
+ </p>
+
+ <p>
+ We create a API project called hello-api, which contains the
following
+ interface.
+ </p>
+<source>
+/**
+ * API of the Hello service.
+ */
+public interface Hello
+{
+ void announce();
+}
+</source>
+ <p>
+ And then we need an implementation of the API, and we call that
+ hello-impl.
+ </p>
+<source>
+/**
+ * Implementation of the Hello API.
+ */
+public class HelloImpl
+ implements Hello
+{
+ private String m_message;
+
+ public Hello( String message )
+ {
+ m_message = message;
+ }
+
+ public void announce()
+ {
+ System.out.println( m_message );
+ }
+}
+</source>
+
+ <p>
+ so we need to do the following from the class that loads the plugin;
+ </p>
+
+<source>
+ URI uri = new URI( "artifact:part:mycompany/thisproject/hello-impl#1.4.1"
);
+ Object[] args = new Object[] { "Hello, World!" };
+ Part part = Part.load( uri );
+ Hello plugin = (Hello) part.instantiate( args );
+ plugin.announce();
+</source>
+
+ <p>
+ For this to work, you will need to create the plugin meta
+ descriptor. The easiest way is to use the DPML Depot build system,
+ but it can also be done manually or with other tools. The above
+ would need a simple descriptor like this;
+ </p>
+
+<pre><![CDATA[<?xml version="1.0"?>
+
+<part xmlns="dpml:part"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
+
+ <info title="Example">
+ <description>An example plugin.</description>
+ </info>
+
+ <plugin class="HelloImpl">
+
+ <classpath>
+ <public>
+ <uri>artifact:jar:mycompany/thisproject/hello-api#1.4.1</uri>
+ </public>
+ <private>
+ <uri>artifact:jar:mycompany/thisproject/hello-impl#1.4.1</uri>
+ </private>
+ </classpath>
+
+</part>]]></pre>
+ <p>
+ Now, the beauty of Transit is that IF the hello-api artifact is
present
+ in the parent classloader (or higher), the API classloader will NOT
+ receive an additional instance of the Jar. This means that, if
+ the plugin user have the hello-api already loaded it is not added
to the
+ API classloader, and the correct classloader management is ensured.
+ Furthermore, if any of the Classloaders in the chain
+ becomes empty, i.e. no new URLs not present in the parent
structure,
+ then the Classloader in question is not created.
+ </p>
+
+ </section>
+
+ </body>
+</document>

Modified: trunk/central/site/src/docs/transit/concepts/index.xml
===================================================================
--- trunk/central/site/src/docs/transit/concepts/index.xml 2007-03-05
05:12:27 UTC (rev 1879)
+++ trunk/central/site/src/docs/transit/concepts/index.xml 2007-03-07
02:16:46 UTC (rev 1880)
@@ -59,8 +59,12 @@
</p>

<p>
- At the core of Transit is a URL protocol handler, a classloader meta
- information descriptor and plugin loader.
+ At the core of Transit is a URL protocol handler and a framework
+ for custom content handlers. Content handlers provided by DPML
+ include a deployment system that encapsulates a classloader defintion
+ and deployment strategy, together with a handler supporting the
+ establishment of a Java runtime process.
+
Based on these, Transit is able to manage classloaders, not only
effectively and nearly invisible to the casual user, but in a
location
independent way. That means, applications don't need to be concerned
over

Modified: trunk/central/site/src/docs/transit/config/index.xml
===================================================================
--- trunk/central/site/src/docs/transit/config/index.xml 2007-03-05
05:12:27 UTC (rev 1879)
+++ trunk/central/site/src/docs/transit/config/index.xml 2007-03-07
02:16:46 UTC (rev 1880)
@@ -42,7 +42,8 @@

<p>
The following information summarises the formal structures declared
under
- <tt><a
href="http://download.dpml.net/dtds/transit_1_0.dtd";>transit_1_0.dtd</a></tt>.
+ Transit 2.0 DTD (refer DTD files published under the <a
href="http://download.dpml.net/dtds";>
+ DPML DTD repository</a>).
</p>

</subsection>
@@ -94,20 +95,23 @@

<source><![CDATA[
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE transit PUBLIC "-//DPML//DTD Transit Configuration Version
1.0//EN"
- "http://download.dpml.net/dtds/transit_1_0.dtd"; >
+<!DOCTYPE transit PUBLIC
+ "-//DPML//DTD Transit Configuration Version 2.0//EN"
+ "http://download.dpml.net/dtds/transit_2_0.dtd"; >

<transit cache="${dpml.data}/cache" layout="classic">

<local path="file:${dpml.share}/local" layout="modern"/>
-
+
<hosts>
- <host id="dpml" priority="40" url="http://repository.dpml.net/classic";
layout="classic"/>
- <host id="ibiblio" priority="70" url="http://www.ibiblio.org/maven";
layout="classic"/>
- <host id="m2" priority="100" url="http://www.ibiblio.org/maven2";
layout="modern"/>
- <host id="apache" priority="140"
url="http://www.apache.org/dist/java-repository"; layout="classic"/>
+ <host id="dpml" priority="20" url="http://repository.dpml.net/modern";
layout="modern"/>
+ <host id="maven" priority="40" url="http://www.ibiblio.org/maven2";
layout="modern"/>
+ <host id="classic" priority="60"
url="http://repository.dpml.net/classic"; layout="classic"/>
+ <host id="ibiblio" priority="80" url="http://www.ibiblio.org/maven";
layout="classic"/>
+ <host id="apache" priority="100"
+ url="http://www.apache.org/dist/java-repository"; layout="classic"/>
</hosts>
-
+
</transit>
]]></source>


Modified: trunk/central/site/src/docs/transit/navigation.xml
===================================================================
--- trunk/central/site/src/docs/transit/navigation.xml 2007-03-05 05:12:27
UTC (rev 1879)
+++ trunk/central/site/src/docs/transit/navigation.xml 2007-03-07 02:16:46
UTC (rev 1880)
@@ -31,8 +31,6 @@
<item name="Cache Configuration" href="config/index.html"/>
<item name="Part Directive" href="parts/index.html"/>
<item name="Protocols" href="technical/index.html"/>
- <item name="Ant" href="tasks/index.html"/>
- <item name="CLI" href="cli/index.html"/>
</menu>

</body>

Modified: trunk/central/site/src/docs/transit/technical/navigation.xml
===================================================================
--- trunk/central/site/src/docs/transit/technical/navigation.xml
2007-03-05 05:12:27 UTC (rev 1879)
+++ trunk/central/site/src/docs/transit/technical/navigation.xml
2007-03-07 02:16:46 UTC (rev 1880)
@@ -26,7 +26,7 @@

<menu>
<item name="Local" href="local.html"/>
- <item name="Registry" href="registry.html"/>
+ <!--<item name="Registry" href="registry.html"/>-->
<item name="Artifact" href="artifact.html"/>
<item name="Link" href="link.html"/>
</menu>

Deleted: trunk/central/site/src/docs/transit/technical/registry.xml
===================================================================
--- trunk/central/site/src/docs/transit/technical/registry.xml 2007-03-05
05:12:27 UTC (rev 1879)
+++ trunk/central/site/src/docs/transit/technical/registry.xml 2007-03-07
02:16:46 UTC (rev 1880)
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- Copyright 2005 Stephen McConnell
- Copyright 2004 Niclas Hedhman
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.dpml.net/central/about/legal/
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied.
-
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<document>
- <properties>
- <author email="mcconnell AT dpml.net">Stephen McConnell</author>
- <title>DPML Transit Registry Protocol</title>
- </properties>
-
- <body>
- <section name="Registry Protocol">
-
- <p>
- The <code>registry</code> protocol handler provides support accessing
- a remote object published within an RMI registry using a URI in the
- form <tt>registry[:&lt;host&gt;[:&lt;port&gt;]]:&lt;path&gt;</tt>.
- </p>
-
- <subsection name="Specification">
- <p>
- The specification of the registry protocol is as follows;
- </p>
-<source>registry[:&lt;host&gt;[:&lt;port&gt;]]:&lt;path&gt;</source>
- </subsection>
-
- <table>
- <tr>
- <td>
- host
- </td>
- <td>
- The RMI registry host.
- </td>
- </tr>
- <tr>
- <td>
- port
- </td>
- <td>
- The assigned port. Defaults to 1099.
- </td>
- </tr>
- <tr>
- <td>
- path
- </td>
- <td>
- The name under which the object is published.
- </td>
- </tr>
- </table>
-
- <subsection name="Using an registry URL" >
- <p>
- Using registry URLs are no different from any http or ftp URLs. You
- create them by instantiating the <code>java.net.URL</code> class,
- and setting the protocol to "registry" (no quotes).
- </p>
- <p>
- The following example registry URI identifies a object named
- "dpml/station".
- </p>
-
- <pre>registry:dpml/station</pre>
-
- <p>
- The following code demonstrates the resolution of the object.
- </p>
-
-<source>URI uri = new URI( "registry:dpml/station" );
-Station station = (Station) uri.toURL().getContent( new
Class[]{Station.class} ); </source>
-
- </subsection>
-
- </section>
- </body>
-</document>
-
-
-

Modified: trunk/central/site/src/docs/transit/tutorials/overview.xml
===================================================================
--- trunk/central/site/src/docs/transit/tutorials/overview.xml 2007-03-05
05:12:27 UTC (rev 1879)
+++ trunk/central/site/src/docs/transit/tutorials/overview.xml 2007-03-07
02:16:46 UTC (rev 1880)
@@ -19,8 +19,8 @@
<p>
The above URL is referencing a 'jar' resource within the group
'dpml/metro', named
'dpml-metro-composition', and version '3000'. This information is
sufficient for
- Transit to retrieve the resource from one of resurce hosts it is
associated with and
- locally cache the resource.
+ Transit to retrieve the resource from one of the resurce hosts it is
associated
+ with and locally cache the resource.
</p>

<p>In effect ...</p>
@@ -32,7 +32,7 @@
| is handled by
|
|-----------------------------------| n 1 |-----------| 1 n
|----------------|
- | dpml.transit.artifact.Handler | &lt;&gt;---- | Transit |
&lt;&gt;----| ResourceHost |
+ | dpml.transit.artifact.Handler | &lt;&gt;---- | Transit |
&lt;&gt;----| ResourceHost |
|-----------------------------------| |-----------|
|----------------|
</pre>

@@ -49,7 +49,7 @@
Here is an example of URI and URL construction:
</p>

- <source>String path =
"artifact:jar:dpml/metro/dpml-metro-composition#3000";
+ <source>String path = "artifact:jar:org/acme/widget#1.2.3";
URI uri = new URI( path );
URL url = uri.toURL();</source>

@@ -60,8 +60,8 @@

<ol>
<li>the system property <code>java.protocol.handler.pkgs</code> is
declared
- with a value including <code>net.dpml.transit</code>. For
example:<br/><br/><code>
- System.setProperty( "java.protocol.handler.pkgs", "net.dpml.transit"
);</code><br/><br/></li>
+ with a value including the package name <code>dpml.transit</code>.
For example:<br/><br/><code>
+ System.setProperty( "java.protocol.handler.pkgs", "dpml.transit"
);</code><br/><br/></li>
<li>the <code>dpml-transit-main.jar</code> is included within the
system classloader</li>
</ol>


Modified: trunk/central/site/src/docs/util/navigation.xml
===================================================================
--- trunk/central/site/src/docs/util/navigation.xml 2007-03-05 05:12:27
UTC (rev 1879)
+++ trunk/central/site/src/docs/util/navigation.xml 2007-03-07 02:16:46
UTC (rev 1880)
@@ -28,6 +28,7 @@
<menu>
<item name="Overview" href="concepts/index.html"/>
<item name="CommandLine" href="cli/index.html"/>
+ <item name="Transit" href="transit/index.html"/>
</menu>

</body>




  • r1880 - in trunk/central/site/src/docs: . about depot/tasks transit transit/concepts transit/config transit/technical transit/tutorials util, mcconnell at BerliOS, 03/06/2007

Archive powered by MHonArc 2.6.24.

Top of Page