Skip to Content.
Sympa Menu

notify-dpml - r1485 - in trunk/main: metro/runtime/src/main/net/dpml/metro/runtime planet/http planet/http/impl planet/http/impl/src/main/net/dpml/http planet/http/impl/src/test/net/dpml/http planet/http/server planet/http/test/src

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: r1485 - in trunk/main: metro/runtime/src/main/net/dpml/metro/runtime planet/http planet/http/impl planet/http/impl/src/main/net/dpml/http planet/http/impl/src/test/net/dpml/http planet/http/server planet/http/test/src
  • Date: Fri, 2 Jun 2006 06:27:25 +0200

Author: mcconnell
Date: 2006-06-02 06:27:22 +0200 (Fri, 02 Jun 2006)
New Revision: 1485

Added:

trunk/main/planet/http/impl/src/main/net/dpml/http/NCSARequestLogHandler.java
Removed:
trunk/main/planet/http/impl/src/main/net/dpml/http/NCSARequestLog.java
trunk/main/planet/http/test/src/main/
Modified:

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultPartsManager.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultProvider.java
trunk/main/planet/http/impl/build.xml

trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHandlerCollection.java
trunk/main/planet/http/impl/src/main/net/dpml/http/Scheme.java
trunk/main/planet/http/impl/src/main/net/dpml/http/Server.java

trunk/main/planet/http/impl/src/test/net/dpml/http/NCSARequestLogTestCase.java
trunk/main/planet/http/module.xml
trunk/main/planet/http/server/project.xml
Log:
update metro runtime to ensure that the keys of internal parts of a component
are maintained in the order declared by the external descriptor

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
2006-06-01 04:46:20 UTC (rev 1484)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
2006-06-02 04:27:22 UTC (rev 1485)
@@ -315,7 +315,7 @@

//--------------------------------------------------------------------------

/**
- * Return an <tt>Provider</tt> holder. The value returned will be a
function
+ * Return a <tt>Provider</tt>. The value returned will be a function
* of the lifestyle policy implemented by the component.
*
* @return the <tt>Provider</tt>
@@ -332,7 +332,7 @@
}

/**
- * Return the component model assiged to the handler.
+ * Return the component model assigned to the handler.
* @return the component model
*/
public ComponentModel getComponentModel()
@@ -623,10 +623,6 @@
Version v = s.getVersion();
Class c = s.getServiceClass();

- //System.out.println( "# CLASS: " + clazz + " / " + c + ", " +
clazz.isAssignableFrom( c ) );
- //System.out.println( "# VERSION: " + version + " / " + v + ", "
+ v.complies( version ) );
- //System.out.println( "# VERSION/2: " + version.complies( v ) );
-
if( v.complies( version ) && clazz.isAssignableFrom( c ) )
{
return true;
@@ -836,7 +832,7 @@
private boolean m_disposed = false;

/**
- * Return an <tt>I(nstance</tt> taking into account the component
+ * Return an <tt>DefaultProvider</tt> taking into account the
component
* lifestyle policy.
* @return the <tt>Provider</tt> manager
* @exception ControlException of a controller error occurs

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java
2006-06-01 04:46:20 UTC (rev 1484)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java
2006-06-02 04:27:22 UTC (rev 1485)
@@ -20,10 +20,12 @@

import java.io.IOException;
import java.rmi.RemoteException;
-import java.util.HashMap;
+import java.util.Hashtable;
import java.util.EventObject;
import java.util.EventListener;
import java.util.Map;
+import java.util.LinkedList;
+import java.util.List;

import net.dpml.component.Directive;
import net.dpml.component.ActivationPolicy;
@@ -70,7 +72,8 @@
private final ClassLoader m_classloader;
private final Classpath m_classpath;

- private final HashMap m_parts = new HashMap();
+ private final List m_keys = new LinkedList();
+ private final Hashtable m_parts = new Hashtable();
private final DefaultContextModel m_context;
private final String m_path;

@@ -121,7 +124,7 @@
m_lifestyle = lifestyle;
}

- m_collection = m_directive.getCollectionPolicy();
+ m_collection = m_directive.getCollectionPolicy();
ContextDirective context = m_directive.getContextDirective();
m_context = new DefaultContextModel( this, logger, m_classloader,
m_type, context );

@@ -193,6 +196,10 @@
ComponentDirective component = (ComponentDirective) part;
ComponentModel model =
controller.createComponentModel( classloader, classpath,
base, component );
+ if( !map.containsKey( key ) )
+ {
+ m_keys.add( key );
+ }
map.put( key, model );
}
else
@@ -390,7 +397,8 @@
*/
public String[] getPartKeys()
{
- return (String[]) m_parts.keySet().toArray( new String[0] );
+ return (String[]) m_keys.toArray( new String[0] );
+ //return (String[]) m_parts.keySet().toArray( new String[0] );
}

/**

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultPartsManager.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultPartsManager.java
2006-06-01 04:46:20 UTC (rev 1484)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultPartsManager.java
2006-06-02 04:27:22 UTC (rev 1485)
@@ -148,7 +148,18 @@
*/
public String[] getKeys()
{
- return (String[]) m_handlers.keySet().toArray( new String[0] );
+ try
+ {
+ return m_handler.getComponentManager().getPartKeys();
+ }
+ catch( RemoteException e )
+ {
+ final String error =
+ "Remote IO error while attempting to get parts keys in
component ["
+ + m_handler
+ + "]";
+ throw new ControllerRuntimeException( error, e );
+ }
}

/**
@@ -291,7 +302,6 @@
{
list.add( component );
queue.add( component, 0 );
- //component.commission();
}
}
catch( Throwable e )

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultProvider.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultProvider.java
2006-06-01 04:46:20 UTC (rev 1484)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultProvider.java
2006-06-02 04:27:22 UTC (rev 1485)
@@ -280,7 +280,7 @@

public void finalize() throws Throwable
{
- getLogger().debug( "finalizing " + this );
+ getLogger().debug( "finalizing provider: " + this );
dispose();
}

@@ -310,7 +310,7 @@
}
m_value = m_handler.createNewObject( this );
m_tag = createTag( m_value );
- getLogger().debug( m_tag + "activating instance" );
+ getLogger().debug( "activating instance" + m_tag );
m_machine.initialize( m_value );
m_activated = true;
}

Modified: trunk/main/planet/http/impl/build.xml
===================================================================
--- trunk/main/planet/http/impl/build.xml 2006-06-01 04:46:20 UTC (rev
1484)
+++ trunk/main/planet/http/impl/build.xml 2006-06-02 04:27:22 UTC (rev
1485)
@@ -43,9 +43,9 @@
</services>
</type>

- <type xmlns="metro" class="net.dpml.http.NCSARequestLog"
threadsafe="true" name="ncsa">
+ <type xmlns="metro" class="net.dpml.http.NCSARequestLogHandler"
threadsafe="true" name="ncsa">
<services>
- <service class="org.mortbay.jetty.RequestLog"/>
+ <service class="org.mortbay.jetty.handler.RequestLogHandler"/>
</services>
</type>

@@ -61,7 +61,7 @@
</services>
</type>

- <type xmlns="metro" class="net.dpml.http.SelectChannelConnector"
threadsafe="true" name="sc-connector">
+ <type xmlns="metro" class="net.dpml.http.SelectChannelConnector"
threadsafe="true" name="select">
<services>
<service class="org.mortbay.jetty.Connector"/>
</services>
@@ -73,7 +73,7 @@
</services>
</type>

- <type xmlns="metro" class="net.dpml.http.ContextHandlerCollection"
threadsafe="true" name="context">
+ <type xmlns="metro" class="net.dpml.http.ContextHandlerCollection"
threadsafe="true" name="handlers">
<services>
<service class="org.mortbay.jetty.handler.HandlerCollection"/>
</services>
@@ -104,14 +104,6 @@
</state>
</state>
<parts>
- <component key="requestLog"
- type="net.dpml.http.NCSARequestLog" collection="hard"
activation="DEMAND">
- <context>
- <entry key="filename"
value="$${dpml.data}/logs/http/request.log"/>
- <entry key="append" value="true"/>
- <entry key="extended" value="true"/>
- </context>
- </component>
<component key="threadPool"
type="net.dpml.http.BoundedThreadPool" collection="hard"
activation="DEMAND">
<context>

Modified:
trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHandlerCollection.java
===================================================================
---
trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHandlerCollection.java
2006-06-01 04:46:20 UTC (rev 1484)
+++
trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHandlerCollection.java
2006-06-02 04:27:22 UTC (rev 1485)
@@ -58,7 +58,7 @@
{
String key = keys[i];
ComponentHandler handler = parts.getComponentHandler( key );
- getLogger().info( "adding context handler: " + handler );
+ getLogger().info( "adding handler: " + handler );
try
{
Provider provider = handler.getProvider();

Deleted:
trunk/main/planet/http/impl/src/main/net/dpml/http/NCSARequestLog.java
===================================================================
--- trunk/main/planet/http/impl/src/main/net/dpml/http/NCSARequestLog.java
2006-06-01 04:46:20 UTC (rev 1484)
+++ trunk/main/planet/http/impl/src/main/net/dpml/http/NCSARequestLog.java
2006-06-02 04:27:22 UTC (rev 1485)
@@ -1,166 +0,0 @@
-/*
- * Copyright 2004 Niclas Hedman.
- * Copyright 2005-2006 Stephen McConnell.
- *
- * 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.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-package net.dpml.http;
-
-import java.io.File;
-
-import net.dpml.util.PropertyResolver;
-
-/**
- * Wrapper for the Jetty NCSA request logger.
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public class NCSARequestLog extends org.mortbay.jetty.NCSARequestLog
-{
- /**
- * Component context.
- */
- public interface Context
- {
- /**
- * Get the array of ignore paths.
- * @param value the default value
- * @return the ignore path array
- */
- String[] getIgnorePaths( String[] value );
-
- /**
- * Return the append policy.
- * @param value the default policy value
- * @return the resolved value
- */
- boolean getAppend( boolean value );
-
- /**
- * Return the extended policy.
- * @param value the default policy value
- * @return the resolved value
- */
- boolean getExtended( boolean value );
-
- /**
- * Return the prefer-proxy-for-address policy.
- * @param value the default policy value
- * @return the resolved value
- */
- boolean getPreferProxiedForAddress( boolean value );
-
- /**
- * Return the log filename.
- * @param value the default filename value (may include symbolic
- * references to system properties)
- * @return the resolved filename
- */
- String getFilename( String value );
-
- /**
- * Return the log date format.
- * @param value the default value
- * @return the resolved value
- */
- String getLogDateFormat( String value );
-
- /**
- * Return the log time zone.
- * @param value the default value
- * @return the resolved value
- */
- String getLogTimeZone( String value );
-
- /**
- * Return the retain days value.
- * @param value the default value
- * @return the resolved value
- */
- int getRetainDays( int value );
-
- /**
- * Get the log latency policy. Ig true the request processing latency
will
- * included in the reqwuest log messages.
- * @param flag the log latency default value
- * @return the resulted log latency policy
- */
- boolean getLogLatency( boolean flag );
-
- /**
- * Get the log cookies policy.
- * @param flag the default policy
- * @return the resolved policy
- */
- boolean getLogCookies( boolean flag );
- }
-
- /**
- * Creation of a new NCSA request log.
- * @param context the deployment context
- */
- public NCSARequestLog( Context context )
- {
- boolean append = context.getAppend( false );
- setAppend( append );
-
- boolean extended = context.getExtended( false );
- setExtended( extended );
-
- boolean preferProxiedFor = context.getPreferProxiedForAddress( false
);
- setPreferProxiedForAddress( preferProxiedFor );
-
- String filename = context.getFilename( null );
- if( filename != null )
- {
- filename = PropertyResolver.resolve( System.getProperties(),
filename );
- File file = new File( filename );
- File parent = file.getParentFile();
- if( null != parent )
- {
- parent.mkdirs();
- }
- setFilename( filename );
- }
-
- String dateformat = context.getLogDateFormat( null );
- if( dateformat != null )
- {
- setLogDateFormat( dateformat );
- }
-
- String[] ignorepaths = context.getIgnorePaths( null );
- if( ignorepaths != null )
- {
- setIgnorePaths( ignorepaths );
- }
-
- String timezone = context.getLogTimeZone( null );
- if( timezone != null )
- {
- setLogTimeZone( timezone );
- }
-
- int retain = context.getRetainDays( -1 );
- if( retain > 0 )
- {
- setRetainDays( retain );
- }
-
- boolean recordLatencyPolicy = context.getLogLatency( false );
- setLogLatency( recordLatencyPolicy );
-
- boolean cookiesPolicy = context.getLogCookies( false );
- setLogCookies( cookiesPolicy );
- }
-}

Added:
trunk/main/planet/http/impl/src/main/net/dpml/http/NCSARequestLogHandler.java
===================================================================
---
trunk/main/planet/http/impl/src/main/net/dpml/http/NCSARequestLogHandler.java
2006-06-01 04:46:20 UTC (rev 1484)
+++
trunk/main/planet/http/impl/src/main/net/dpml/http/NCSARequestLogHandler.java
2006-06-02 04:27:22 UTC (rev 1485)
@@ -0,0 +1,174 @@
+/*
+ * Copyright 2006 Stephen McConnell.
+ *
+ * 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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+package net.dpml.http;
+
+import java.io.File;
+
+import net.dpml.util.PropertyResolver;
+
+import org.mortbay.jetty.handler.RequestLogHandler;
+import org.mortbay.jetty.NCSARequestLog;
+
+/**
+ * Wrapper for the Jetty NCSA request logger.
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public class NCSARequestLogHandler extends RequestLogHandler
+{
+ /**
+ * Component context.
+ */
+ public interface Context
+ {
+ /**
+ * Get the array of ignore paths.
+ * @param value the default value
+ * @return the ignore path array
+ */
+ String[] getIgnorePaths( String[] value );
+
+ /**
+ * Return the append policy.
+ * @param value the default policy value
+ * @return the resolved value
+ */
+ boolean getAppend( boolean value );
+
+ /**
+ * Return the extended policy.
+ * @param value the default policy value
+ * @return the resolved value
+ */
+ boolean getExtended( boolean value );
+
+ /**
+ * Return the prefer-proxy-for-address policy.
+ * @param value the default policy value
+ * @return the resolved value
+ */
+ boolean getPreferProxiedForAddress( boolean value );
+
+ /**
+ * Return the log filename.
+ * @param value the default filename value (may include symbolic
+ * references to system properties)
+ * @return the resolved filename
+ */
+ String getFilename( String value );
+
+ /**
+ * Return the log date format.
+ * @param value the default value
+ * @return the resolved value
+ */
+ String getLogDateFormat( String value );
+
+ /**
+ * Return the log time zone.
+ * @param value the default value
+ * @return the resolved value
+ */
+ String getLogTimeZone( String value );
+
+ /**
+ * Return the retain days value.
+ * @param value the default value
+ * @return the resolved value
+ */
+ int getRetainDays( int value );
+
+ /**
+ * Get the log latency policy. Ig true the request processing latency
will
+ * included in the reqwuest log messages.
+ * @param flag the log latency default value
+ * @return the resulted log latency policy
+ */
+ boolean getLogLatency( boolean flag );
+
+ /**
+ * Get the log cookies policy.
+ * @param flag the default policy
+ * @return the resolved policy
+ */
+ boolean getLogCookies( boolean flag );
+ }
+
+ private final NCSARequestLog m_ncsa;
+
+ /**
+ * Creation of a new NCSA request log.
+ * @param context the deployment context
+ */
+ public NCSARequestLogHandler( Context context )
+ {
+ m_ncsa = new NCSARequestLog();
+
+ boolean append = context.getAppend( false );
+ m_ncsa.setAppend( append );
+
+ boolean extended = context.getExtended( false );
+ m_ncsa.setExtended( extended );
+
+ boolean preferProxiedFor = context.getPreferProxiedForAddress( false
);
+ m_ncsa.setPreferProxiedForAddress( preferProxiedFor );
+
+ String filename = context.getFilename( null );
+ if( filename != null )
+ {
+ filename = PropertyResolver.resolve( System.getProperties(),
filename );
+ File file = new File( filename );
+ File parent = file.getParentFile();
+ if( null != parent )
+ {
+ parent.mkdirs();
+ }
+ m_ncsa.setFilename( filename );
+ }
+
+ String dateformat = context.getLogDateFormat( null );
+ if( dateformat != null )
+ {
+ m_ncsa.setLogDateFormat( dateformat );
+ }
+
+ String[] ignorepaths = context.getIgnorePaths( null );
+ if( ignorepaths != null )
+ {
+ m_ncsa.setIgnorePaths( ignorepaths );
+ }
+
+ String timezone = context.getLogTimeZone( null );
+ if( timezone != null )
+ {
+ m_ncsa.setLogTimeZone( timezone );
+ }
+
+ int retain = context.getRetainDays( -1 );
+ if( retain > 0 )
+ {
+ m_ncsa.setRetainDays( retain );
+ }
+
+ boolean recordLatencyPolicy = context.getLogLatency( false );
+ m_ncsa.setLogLatency( recordLatencyPolicy );
+
+ boolean cookiesPolicy = context.getLogCookies( false );
+ m_ncsa.setLogCookies( cookiesPolicy );
+
+ setRequestLog( m_ncsa );
+ }
+}

Modified: trunk/main/planet/http/impl/src/main/net/dpml/http/Scheme.java
===================================================================
--- trunk/main/planet/http/impl/src/main/net/dpml/http/Scheme.java
2006-06-01 04:46:20 UTC (rev 1484)
+++ trunk/main/planet/http/impl/src/main/net/dpml/http/Scheme.java
2006-06-02 04:27:22 UTC (rev 1485)
@@ -1,6 +1,5 @@
/*
* Copyright 2004 Stephen J. McConnell.
- * Copyright 1999-2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

Modified: trunk/main/planet/http/impl/src/main/net/dpml/http/Server.java
===================================================================
--- trunk/main/planet/http/impl/src/main/net/dpml/http/Server.java
2006-06-01 04:46:20 UTC (rev 1484)
+++ trunk/main/planet/http/impl/src/main/net/dpml/http/Server.java
2006-06-02 04:27:22 UTC (rev 1485)
@@ -71,12 +71,6 @@
public interface Parts extends PartsManager
{
/**
- * Return the default request log.
- * @return the default request log.
- */
- RequestLog getRequestLog();
-
- /**
* Return the default thread pool.
* @return the default thread pool.
*/

Modified:
trunk/main/planet/http/impl/src/test/net/dpml/http/NCSARequestLogTestCase.java
===================================================================
---
trunk/main/planet/http/impl/src/test/net/dpml/http/NCSARequestLogTestCase.java
2006-06-01 04:46:20 UTC (rev 1484)
+++
trunk/main/planet/http/impl/src/test/net/dpml/http/NCSARequestLogTestCase.java
2006-06-02 04:27:22 UTC (rev 1485)
@@ -21,7 +21,8 @@
import java.util.Map;
import java.util.Hashtable;

-import net.dpml.http.NCSARequestLog.Context;
+import net.dpml.http.NCSARequestLogHandler.Context;
+import org.mortbay.jetty.NCSARequestLog;

import net.dpml.util.ContextInvocationHandler;

@@ -43,6 +44,7 @@
private static final boolean LATENCY_POLICY = true;
private static final boolean COOKIE_POLICY = true;

+ private NCSARequestLogHandler m_handler;
private NCSARequestLog m_logger;

/**
@@ -65,7 +67,8 @@

Class clazz = Context.class;
Context context = (Context)
ContextInvocationHandler.getProxiedInstance( clazz, map );
- m_logger = new NCSARequestLog( context );
+ m_handler = new NCSARequestLogHandler( context );
+ m_logger = (NCSARequestLog) m_handler.getRequestLog();
}



Modified: trunk/main/planet/http/module.xml
===================================================================
--- trunk/main/planet/http/module.xml 2006-06-01 04:46:20 UTC (rev 1484)
+++ trunk/main/planet/http/module.xml 2006-06-02 04:27:22 UTC (rev 1485)
@@ -55,9 +55,6 @@
<property name="project.test.fork" value="true"/>
<property name="project.javadoc.exclude" value="true"/>
</properties>
- <types>
- <type id="jar"/>
- </types>
<dependencies>
<build>
<include key="dpml-http-server"/>

Modified: trunk/main/planet/http/server/project.xml
===================================================================
--- trunk/main/planet/http/server/project.xml 2006-06-01 04:46:20 UTC (rev
1484)
+++ trunk/main/planet/http/server/project.xml 2006-06-02 04:27:22 UTC (rev
1485)
@@ -4,12 +4,14 @@

<types>
<component xmlns="link:xsd:dpml/lang/dpml-component#1.0"
- alias="true" type="net.dpml.http.Server">
+ alias="true" type="net.dpml.http.Server" lifestyle="singleton"
collection="hard">
<parts>
<!--
Add a select channel connector to 8080.
-->
- <component key="plain" type="net.dpml.http.SelectChannelConnector">
+ <component key="http" type="net.dpml.http.SelectChannelConnector"
+ lifestyle="singleton"
+ collection="hard">
<context>
<entry key="port" value="8080"/>
<entry key="maxIdleTime" value="50000"/>
@@ -19,7 +21,9 @@
<!--
Add a SSL connector to 8443.
-->
- <component key="ssl" type="net.dpml.http.SslSocketConnector">
+ <component key="https" type="net.dpml.http.SslSocketConnector"
+ lifestyle="singleton"
+ collection="hard">
<context>
<entry key="port" value="8443"/>
<entry key="maxIdleTime" value="30000"/>
@@ -33,7 +37,9 @@
<!--
Add a user realm.
-->
- <component key="realm" type="net.dpml.http.HashUserRealm">
+ <component key="realm" type="net.dpml.http.HashUserRealm"
+ lifestyle="singleton"
+ collection="hard">
<context>
<entry key="name" value="Test Realm"/>
<entry key="URI"
value="local:properties:dpml/planet/http/realm"/>
@@ -42,13 +48,16 @@
<!--
Add context handler collection.
-->
- <component key="contextHandlerCollection"
type="net.dpml.http.ContextHandlerCollection">
+ <component key="contextHandlerCollection"
type="net.dpml.http.ContextHandlerCollection"
+ lifestyle="singleton"
+ collection="hard">
<parts>
<!--
Creation of a HTTP server configured to present static content
in
the ${dpml.share}/docs directory.
-->
- <component key="docs"
type="net.dpml.http.ResourceContextHandler">
+ <component key="docs" type="net.dpml.http.ResourceContextHandler"
+ collection="hard" lifestyle="singleton">
<context>
<entry key="resourceBase" value="${dpml.share}/docs"/>
<entry key="contextPath" value="/docs"/>
@@ -60,7 +69,8 @@
per-component threads - currently limited to classes declared
within
the part classloader).
-->
- <component key="servlets"
type="net.dpml.http.ServletContextHandler">
+ <component key="servlets"
type="net.dpml.http.ServletContextHandler"
+ collection="hard" lifestyle="singleton">
<context>
<entry key="resourceBase" value="${dpml.data}"/>
<entry key="contextPath" value="/data"/>
@@ -81,12 +91,25 @@
<!--
Add a web application.
-->
- <component key="webapp"
type="net.dpml.http.WebAppContextHandler">
+ <component key="webapp" type="net.dpml.http.WebAppContextHandler"
+ collection="hard" lifestyle="singleton">
<context>
<entry key="contextPath" value="/"/>
<entry key="war"
value="link:war:dpml/planet/http/dpml-http-app"/>
</context>
</component>
+ <!--
+ NCSA Request log.
+ -->
+ <component key="ncsa"
+ type="net.dpml.http.NCSARequestLogHandler"
+ collection="hard" lifestyle="singleton">
+ <context>
+ <entry key="filename"
value="${dpml.data}/logs/http/request.log"/>
+ <entry key="append" value="true"/>
+ <entry key="extended" value="true"/>
+ </context>
+ </component>
</parts>
</component>
</parts>




  • r1485 - in trunk/main: metro/runtime/src/main/net/dpml/metro/runtime planet/http planet/http/impl planet/http/impl/src/main/net/dpml/http planet/http/impl/src/test/net/dpml/http planet/http/server planet/http/test/src, mcconnell at BerliOS, 06/02/2006

Archive powered by MHonArc 2.6.24.

Top of Page