Skip to Content.
Sympa Menu

notify-dpml - r933 - in trunk/main: metro/test metro/tools/src/main/net/dpml/metro/tools planet/http/demo

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: r933 - in trunk/main: metro/test metro/tools/src/main/net/dpml/metro/tools planet/http/demo
  • Date: Wed, 18 Jan 2006 17:23:57 +0100

Author: mcconnell
Date: 2006-01-18 17:23:56 +0100 (Wed, 18 Jan 2006)
New Revision: 933

Modified:
trunk/main/metro/test/build.xml
trunk/main/metro/tools/src/main/net/dpml/metro/tools/EntryDataType.java
trunk/main/planet/http/demo/build.xml
Log:
add support for usage of "lookup" as a attribute in the context entry

Modified: trunk/main/metro/test/build.xml
===================================================================
--- trunk/main/metro/test/build.xml 2006-01-18 02:45:27 UTC (rev 932)
+++ trunk/main/metro/test/build.xml 2006-01-18 16:23:56 UTC (rev 933)
@@ -248,7 +248,7 @@
</component>
<component key="listener" type="net.dpml.test.app.DefaultListener">
<context>
- <entry key="server" uri="lookup:net.dpml.test.app.Server"/>
+ <entry key="server" lookup="net.dpml.test.app.Server"/>
</context>
</component>
</parts>

Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/EntryDataType.java
===================================================================
--- trunk/main/metro/tools/src/main/net/dpml/metro/tools/EntryDataType.java
2006-01-18 02:45:27 UTC (rev 932)
+++ trunk/main/metro/tools/src/main/net/dpml/metro/tools/EntryDataType.java
2006-01-18 16:23:56 UTC (rev 933)
@@ -63,8 +63,34 @@
{
m_uri = uri;
}
-
+
/**
+ * Set the interface classname to locate with the enclosing component.
+ * @param service the service classname
+ */
+ public void setLookup( final String service )
+ {
+ if( null != m_uri )
+ {
+ final String error =
+ "Attributes 'feature', 'lookup' and 'uri' are mutually
exlusive.";
+ throw new BuildException( error );
+ }
+ try
+ {
+ m_uri = new URI( "lookup:" + service );
+ }
+ catch( Exception e )
+ {
+ final String error =
+ "Failed to set ["
+ + service
+ + "] lookup reference.";
+ throw new BuildException( error, e );
+ }
+ }
+
+ /**
* Set the feature that this directive references.
* @param feature the component feature
*/
@@ -73,7 +99,7 @@
if( null != m_uri )
{
final String error =
- "Attributes 'feature' and 'uri' are mutually exlusive.";
+ "Attributes 'feature', 'lookup' and 'uri' are mutually
exlusive.";
throw new BuildException( error );
}
try

Modified: trunk/main/planet/http/demo/build.xml
===================================================================
--- trunk/main/planet/http/demo/build.xml 2006-01-18 02:45:27 UTC (rev
932)
+++ trunk/main/planet/http/demo/build.xml 2006-01-18 16:23:56 UTC (rev
933)
@@ -50,14 +50,14 @@
<component type="net.dpml.http.impl.SocketListener"
key="socketListener" collection="hard"
activation="false">
<context>
- <entry key="httpServer"
uri="lookup:net.dpml.http.spi.HttpService"/>
+ <entry key="httpServer" lookup="net.dpml.http.spi.HttpService"/>
<entry key="port" value="8080"/>
</context>
</component>
<component key="context" type="net.dpml.http.impl.HttpContextImpl"
collection="hard">
<context>
- <entry key="server" uri="lookup:net.dpml.http.spi.HttpService"/>
- <entry key="requestLog"
uri="lookup:org.mortbay.http.RequestLog"/>
+ <entry key="server" lookup="net.dpml.http.spi.HttpService"/>
+ <entry key="requestLog" lookup="org.mortbay.http.RequestLog"/>
<entry key="tempDirectory"
value="$${java.io.tmpdir}/http/context"/>
<entry key="contextPath" value="/"/>
<entry key="gracefulStop" value="true"/>
@@ -68,13 +68,13 @@
<entry key="name" value="resource-handler"/>
<entry key="dirAllowed" value="true"/>
<entry key="allowedMethods" value="GET"/>
- <entry key="httpContext"
uri="lookup:net.dpml.http.spi.HttpContextService"/>
+ <entry key="httpContext"
lookup="net.dpml.http.spi.HttpContextService"/>
</context>
</component>
<component key="notFoundHandler"
type="net.dpml.http.impl.NotFoundHandler" collection="hard">
<context>
<entry key="name" value="not-found-handler"/>
- <entry key="httpContext"
uri="lookup:net.dpml.http.spi.HttpContextService"/>
+ <entry key="httpContext"
lookup="net.dpml.http.spi.HttpContextService"/>
</context>
</component>
</parts>




  • r933 - in trunk/main: metro/test metro/tools/src/main/net/dpml/metro/tools planet/http/demo, mcconnell at BerliOS, 01/18/2006

Archive powered by MHonArc 2.6.24.

Top of Page