mcconnell 2002/09/09 06:34:50
Modified: assembly build.xml
assembly/lib corbaloc-1.0.jar
assembly/src/etc activation.mf kernel.xml
assembly/src/etc/activator client.xml server.xml
assembly/src/java/org/apache/excalibur/merlin
ExceptionHelper.java
assembly/src/java/org/apache/excalibur/merlin/activation
RemoteResourceFactory.java
assembly/src/java/org/apache/excalibur/merlin/container
Container.java ContainerHelper.java
DefaultContainer.java DefaultContainer.xinfo
assembly/src/java/org/apache/excalibur/merlin/kernel
DefaultKernel.java
assembly/src/java/org/apache/excalibur/merlin/service
Handler.java ServiceURLConnection.java
ServiceURLFactory.java
assembly/src/java/org/apache/excalibur/playground
CustomContainer.xinfo
assembly/src/java/org/apache/excalibur/playground/activation
TestServant.xinfo
Log:
Updating again.
Revision Changes Path
1.59 +2 -2 jakarta-avalon-excalibur/assembly/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/build.xml,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- build.xml 9 Sep 2002 04:39:17 -0000 1.58
+++ build.xml 9 Sep 2002 13:34:49 -0000 1.59
@@ -487,8 +487,8 @@
<target name="patch">
<replace dir="src/java"
- token="org.apache.excalibur.merlin.container.service"
- value="org.apache.excalibur.merlin.service" >
+ token="ServiceManagementContext"
+ value="Registry" >
<include name="**/*.java"/>
</replace>
</target>
1.5 +49 -27 jakarta-avalon-excalibur/assembly/lib/corbaloc-1.0.jar
<<Binary file>>
1.2 +1 -1 jakarta-avalon-excalibur/assembly/src/etc/activation.mf
Index: activation.mf
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/etc/activation.mf,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- activation.mf 9 Sep 2002 04:33:52 -0000 1.1
+++ activation.mf 9 Sep 2002 13:34:49 -0000 1.2
@@ -9,5 +9,5 @@
Name: org/apache/excalibur/merlin/activation/DefaultRemoteResourceFactory.class
Avalon: Type
-Name: org/apache/excalibur/merlin/activation/DefaultServiceResolver.class
+Name: org/apache/excalibur/merlin/activation/Directory.class
Avalon: Type
1.43 +2 -2 jakarta-avalon-excalibur/assembly/src/etc/kernel.xml
Index: kernel.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/etc/kernel.xml,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- kernel.xml 8 Sep 2002 16:53:55 -0000 1.42
+++ kernel.xml 9 Sep 2002 13:34:49 -0000 1.43
@@ -46,7 +46,7 @@
the corresponds to the name of the logging file.
-->
- <logging priority="DEBUG" target="default">
+ <logging priority="INFO" target="default">
<category priority="WARN" name="logging" />
<target name="kernel">
<file location="kernel.log" />
@@ -158,7 +158,7 @@
<container name="custom"
class="org.apache.excalibur.playground.CustomContainer">
- <categories priority="DEBUG">
+ <categories priority="INFO">
<category priority="WARN" name="loader" />
</categories>
1.4 +7 -6 jakarta-avalon-excalibur/assembly/src/etc/activator/client.xml
Index: client.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/etc/activator/client.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- client.xml 9 Sep 2002 04:33:52 -0000 1.3
+++ client.xml 9 Sep 2002 13:34:49 -0000 1.4
@@ -54,15 +54,16 @@
hosted under a remote container. The remote service will not activated
until the test client actually invokes an operation of the remote service.
This demonstrates the ability to properate references to services
- encapsulated in resources and the automatic management of actiovation on
+ encapsulated in resources and the automatic management of activation on
demand across distributed containers.
-->
- <component name="client"
class="org.apache.excalibur.playground.activation.ActivationClient" activation="true">
- <categories priority="DEBUG"/>
- <configuration>
- <connection url="corbaloc:iiop:[EMAIL PROTECTED]:2056/activator/servant"/>
- </configuration>
+ <component name="client"
+ class="org.apache.excalibur.playground.activation.ActivationClient"
activation="true">
+ <categories priority="DEBUG"/>
+ <configuration>
+ <connection url="corbaloc:iiop:1.2@localhost:2056/public/demo"/>
+ </configuration>
</component>
</container>
1.7 +4 -3 jakarta-avalon-excalibur/assembly/src/etc/activator/server.xml
Index: server.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/etc/activator/server.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- server.xml 9 Sep 2002 05:49:17 -0000 1.6
+++ server.xml 9 Sep 2002 13:34:49 -0000 1.7
@@ -6,7 +6,7 @@
<kernel>
<system>
- <host>home.osm.net</host>
+ <host>localhost</host>
</system>
<logging priority="INFO" target="default">
@@ -62,7 +62,7 @@
of services that it is hosting.
-->
- <container name="activator"
class="org.apache.excalibur.merlin.activation.DefaultServiceResolver">
+ <container name="public"
class="org.apache.excalibur.merlin.activation.Directory">
<categories priority="INFO">
<category priority="WARN" name="loader" />
@@ -74,7 +74,8 @@
</fileset>
</classpath>
- <component name="servant"
class="org.apache.excalibur.playground.activation.TestServant" activation="true">
+ <component name="demo"
+ class="org.apache.excalibur.playground.activation.TestServant"
activation="true">
<categories priority="DEBUG"/>
</component>
1.2 +3 -3
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/ExceptionHelper.java
Index: ExceptionHelper.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/ExceptionHelper.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ExceptionHelper.java 9 Sep 2002 04:33:53 -0000 1.1
+++ ExceptionHelper.java 9 Sep 2002 13:34:50 -0000 1.2
@@ -102,7 +102,7 @@
{
Throwable cause = getCause( e );
out.println( "Cause: " + cause.toString() );
- if( cause.getCause() != null )
+ if( getCause( cause ) != null )
{
printCause( out, cause );
}
@@ -233,7 +233,7 @@
}
error = error + "<tr><td valign='top'>Exception</td><td>"
+ e.getClass().getName() + " <br>" + e.getMessage() + "</td></tr>";
- return packCauseInTable( error, e.getCause() ) + footer;
+ return packCauseInTable( error, getCause( e ) ) + footer;
}
private static String packCauseInTable( String s, Throwable cause )
@@ -244,7 +244,7 @@
}
s = s + "<tr><td valign='top'>Cause:</td><td>"
+ cause.getClass().getName() + " <br>" + cause.getMessage() +
"</td></tr>";
- return packCauseInTable( s, cause.getCause() );
+ return packCauseInTable( s, getCause( cause ) );
}
1.4 +2 -2
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/activation/RemoteResourceFactory.java
Index: RemoteResourceFactory.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/activation/RemoteResourceFactory.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- RemoteResourceFactory.java 8 Sep 2002 16:59:36 -0000 1.3
+++ RemoteResourceFactory.java 9 Sep 2002 13:34:50 -0000 1.4
@@ -13,11 +13,11 @@
/**
- * Interface implemented by a classes capable of creating resource instances.
+ * Interface implemented by a classes capable of creating remotely
+ * accessible resource instances.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephen McConnell</a>
*/
public interface RemoteResourceFactory extends ResourceFactory
{
-
}
1.19 +2 -2
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/Container.java
Index: Container.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/Container.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- Container.java 7 Sep 2002 07:27:11 -0000 1.18
+++ Container.java 9 Sep 2002 13:34:50 -0000 1.19
@@ -51,7 +51,7 @@
/**
* Context key used to locate the service management context.
- * @see org.apache.excalibur.merlin.service.ServiceManagementContext
+ * @see org.apache.excalibur.merlin.service.Registry
*/
static final String REGISTRY_KEY = "merlin:container.registry";
1.3 +7 -7
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/ContainerHelper.java
Index: ContainerHelper.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/ContainerHelper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ContainerHelper.java 8 Sep 2002 14:36:56 -0000 1.2
+++ ContainerHelper.java 9 Sep 2002 13:34:50 -0000 1.3
@@ -28,7 +28,7 @@
import org.apache.excalibur.merlin.model.builder.XMLContainerCreator;
import org.apache.excalibur.merlin.resource.LifestyleManager;
import org.apache.excalibur.merlin.container.ContainerResource;
-import org.apache.excalibur.merlin.service.ServiceManagementContext;
+import org.apache.excalibur.merlin.service.Registry;
/**
* Utility class that provides support for the creation of containers
@@ -76,7 +76,7 @@
/**
* The service manager.
*/
- private ServiceManagementContext m_registry;
+ private Registry m_registry;
//=======================================================================
// constructor
@@ -91,7 +91,7 @@
*/
public ContainerHelper(
ContainerManager manager,
- ServiceManagementContext context )
+ Registry context )
{
this( manager, null, context );
}
@@ -108,7 +108,7 @@
public ContainerHelper(
ContainerManager manager,
LifestyleManager lifestyles,
- ServiceManagementContext context )
+ Registry context )
throws NullPointerException
{
if( manager == null )
@@ -161,7 +161,7 @@
final ContainerManager manager =
m_manager.createContainerManager( descriptor, classpath, m_lifestyles
);
- final ServiceManagementContext registry =
+ final Registry registry =
m_registry.createChild( name );
//
@@ -221,7 +221,7 @@
ContainerDescriptor descriptor,
ContainerManager manager,
Map services,
- ServiceManagementContext registry ) throws Exception
+ Registry registry ) throws Exception
{
//
// create the container context
1.40 +4 -4
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/DefaultContainer.java
Index: DefaultContainer.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/DefaultContainer.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- DefaultContainer.java 9 Sep 2002 04:33:53 -0000 1.39
+++ DefaultContainer.java 9 Sep 2002 13:34:50 -0000 1.40
@@ -40,7 +40,7 @@
import org.apache.excalibur.merlin.container.ContainerResource;
import org.apache.excalibur.merlin.service.Handler;
import org.apache.excalibur.merlin.service.ServiceURLFactory;
-import org.apache.excalibur.merlin.service.ServiceManagementContext;
+import org.apache.excalibur.merlin.service.Registry;
/**
* Default container implementation that manages a registry of componet providers
and
@@ -133,7 +133,7 @@
/**
* The service management context into which resources are bound.
*/
- private ServiceManagementContext m_registry;
+ private Registry m_registry;
/**
* Flag indicating if the container has been through the assembly stage.
@@ -165,7 +165,7 @@
m_manager = (ContainerManager) context.get( MANAGER_KEY );
m_descriptor = (ContainerDescriptor) context.get( DESCRIPTOR_KEY );
m_services = (Map) context.get( SERVICES_KEY );
- m_registry = (ServiceManagementContext) context.get( REGISTRY_KEY );
+ m_registry = (Registry) context.get( REGISTRY_KEY );
//
// set the context classloader
1.13 +1 -1
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/DefaultContainer.xinfo
Index: DefaultContainer.xinfo
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/DefaultContainer.xinfo,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- DefaultContainer.xinfo 8 Sep 2002 12:31:46 -0000 1.12
+++ DefaultContainer.xinfo 9 Sep 2002 13:34:50 -0000 1.13
@@ -27,7 +27,7 @@
type="org.apache.excalibur.merlin.assembly.ContainerManager"/>
<entry key="merlin:container.services" type="java.util.Map"/>
<entry key="merlin:container.registry"
- type="org.apache.excalibur.merlin.service.ServiceManagementContext"/>
+ type="org.apache.excalibur.merlin.service.Registry"/>
<entry key="merlin:container.state-listener"
type="org.apache.excalibur.merlin.container.StateListener"
optional="true"/>
1.51 +16 -10
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/kernel/DefaultKernel.java
Index: DefaultKernel.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/kernel/DefaultKernel.java,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- DefaultKernel.java 9 Sep 2002 04:33:53 -0000 1.50
+++ DefaultKernel.java 9 Sep 2002 13:34:50 -0000 1.51
@@ -49,8 +49,8 @@
import org.apache.excalibur.merlin.service.ServiceURLFactory;
import org.apache.excalibur.merlin.resource.LifestyleManager;
import org.apache.excalibur.merlin.resource.DefaultLifestyleManager;
-import org.apache.excalibur.merlin.service.ServiceManagementContext;
-import org.apache.excalibur.merlin.service.DefaultServiceManagementContext;
+import org.apache.excalibur.merlin.service.Registry;
+import org.apache.excalibur.merlin.service.DefaultRegistry;
import org.apache.excalibur.meta.verifier.VerifyException;
import org.apache.excalibur.mpool.DefaultPoolManager;
import org.apache.excalibur.mpool.PoolManager;
@@ -190,7 +190,7 @@
private File m_baseDirectory;
- private DefaultServiceManagementContext m_registry;
+ private DefaultRegistry m_registry;
//=======================================================================
// Contextualizable
@@ -321,7 +321,7 @@
// Create the service management context.
//
- m_registry = new DefaultServiceManagementContext( domain );
+ m_registry = new DefaultRegistry( domain );
//
// Set up the ThreadManager that the CommandManager uses
@@ -578,15 +578,21 @@
// ignore it
}
}
- try
+ if( m_threadManager != null )
{
- m_threadManager.dispose();
+ try
+ {
+ m_threadManager.dispose();
+ }
+ catch( Throwable e )
+ {
+ // ignore it
+ }
}
- catch( Throwable e )
+ if( m_manager != null )
{
- // ignore it
+ m_manager.dispose();
}
- m_manager.dispose();
}
//=======================================================================
1.3 +2 -2
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/service/Handler.java
Index: Handler.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/service/Handler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Handler.java 9 Sep 2002 04:50:58 -0000 1.2
+++ Handler.java 9 Sep 2002 13:34:50 -0000 1.3
@@ -33,7 +33,7 @@
/**
* The resource registry.
*/
- private ServiceManagementContext m_registry;
+ private Registry m_registry;
/**
* The connection object.
@@ -45,7 +45,7 @@
* @param host the host domain name
* @param registry the service resource management context
*/
- public Handler( String host, ServiceManagementContext registry )
+ public Handler( String host, Registry registry )
{
m_host = host;
m_registry = registry;
1.2 +2 -2
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/service/ServiceURLConnection.java
Index: ServiceURLConnection.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/service/ServiceURLConnection.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ServiceURLConnection.java 7 Sep 2002 07:27:12 -0000 1.1
+++ ServiceURLConnection.java 9 Sep 2002 13:34:50 -0000 1.2
@@ -27,7 +27,7 @@
/**
* The resource registry.
*/
- private ServiceManagementContext m_registry;
+ private Registry m_registry;
/**
* The URL.
@@ -43,7 +43,7 @@
* Creation of a new <code>ServiceURLConnection</code> handler.
* @param url the corbaloc URL
*/
- public ServiceURLConnection( URL url, ServiceManagementContext registry )
+ public ServiceURLConnection( URL url, Registry registry )
{
super( url );
m_url = url;
1.2 +2 -2
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/service/ServiceURLFactory.java
Index: ServiceURLFactory.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/service/ServiceURLFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ServiceURLFactory.java 7 Sep 2002 07:27:12 -0000 1.1
+++ ServiceURLFactory.java 9 Sep 2002 13:34:50 -0000 1.2
@@ -31,7 +31,7 @@
/**
* The resource registry.
*/
- private final ServiceManagementContext m_registry;
+ private final Registry m_registry;
/**
* Creation of a new URL factory for the service protocol.
@@ -39,7 +39,7 @@
* @param host the default host
* @param registry the service resource registry
*/
- public ServiceURLFactory( String host, ServiceManagementContext registry )
+ public ServiceURLFactory( String host, Registry registry )
{
m_host = host;
m_registry = registry;
1.4 +1 -6
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/CustomContainer.xinfo
Index: CustomContainer.xinfo
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/CustomContainer.xinfo,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CustomContainer.xinfo 8 Sep 2002 16:53:55 -0000 1.3
+++ CustomContainer.xinfo 9 Sep 2002 13:34:50 -0000 1.4
@@ -7,11 +7,6 @@
<component>
<name>custom</name>
- <!--
- <attributes>
- <attribute key="merlin:resource-factory"
value="org.apache.excalibur.merlin.container.ContainerFactory"/>
- </attributes>
- -->
</component>
<context>
@@ -27,7 +22,7 @@
type="org.apache.excalibur.merlin.container.ContainerListener"
optional="true"/>
<entry key="merlin:container.registry"
- type="org.apache.excalibur.merlin.service.ServiceManagementContext"/>
+ type="org.apache.excalibur.merlin.service.Registry"/>
</context>
<services>
1.2 +38 -3
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/activation/TestServant.xinfo
Index: TestServant.xinfo
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/activation/TestServant.xinfo,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TestServant.xinfo 9 Sep 2002 04:30:48 -0000 1.1
+++ TestServant.xinfo 9 Sep 2002 13:34:50 -0000 1.2
@@ -6,13 +6,48 @@
<type>
<component>
+
<name>servant</name>
+
<attributes>
- <attribute key="merlin:resource-factory"
value="org.apache.excalibur.merlin.activation.RemoteResourceFactory"/>
+
+ <!--
+ Declaration of a resource factory that will provide resource
+ references that can be referenced remotely.
+ -->
+
+ <attribute key="merlin:resource-factory"
+ value="org.apache.excalibur.merlin.activation.RemoteResourceFactory"/>
+
+ <!--
+ Declaration of the servant creation policy (either "delegate" or "servant").
+ With the delegate policy a POA is created using the tie mechanism. If the
+ policy is servant based then the implemetation class must be derived from
+ the Servant interface (classic POA types).
+ -->
+
<attribute key="corba:poa.implementation" value="delegate"/>
- <attribute key="corba:poa.delegate"
value="org.apache.excalibur.playground.activation.TestCasePOATie"/>
- <attribute key="corba:poa.servant.id"
value="IDL:excalibur.apache.org/playground/activation/TestCase:1.0"/>
+
+ <!--
+ When building with a delegate, the resource implementation needs a
+ reference to the POA tie class. The POA tie object will be created
+ at the time of invocation of an operation by a client holding an
+ object reference to the service.
+ -->
+
+ <attribute key="corba:poa.delegate"
+ value="org.apache.excalibur.playground.activation.TestCasePOATie"/>
+
+ <!--
+ The servant id attribute is used to construct an object reference to
+ a POA backed by the component without requiring component instantiation.
+ -->
+
+ <attribute key="corba:poa.servant.id"
+ value="IDL:excalibur.apache.org/playground/activation/TestCase:1.0"/>
+
</attributes>
+
</component>
<services>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>