Index: C:/JavaProjects/jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/RegistryBuilder.java =================================================================== --- C:/JavaProjects/jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/RegistryBuilder.java (revision 657522) +++ C:/JavaProjects/jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/RegistryBuilder.java (working copy) @@ -153,7 +153,8 @@ infrastructure.startup(); - return new RegistryImpl(infrastructure); + return (Registry) infrastructure.getService(Registry.class, null); + } private void processModuleDescriptorProvider(ModuleDescriptorProvider provider) Index: C:/JavaProjects/jakarta-hivemind/framework/src/java/org/apache/hivemind/service/impl/RegistryFactory.java =================================================================== --- C:/JavaProjects/jakarta-hivemind/framework/src/java/org/apache/hivemind/service/impl/RegistryFactory.java (revision 0) +++ C:/JavaProjects/jakarta-hivemind/framework/src/java/org/apache/hivemind/service/impl/RegistryFactory.java (revision 0) @@ -0,0 +1,38 @@ +// Copyright 2004, 2005 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. +// 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 org.apache.hivemind.service.impl; + +import org.apache.hivemind.ServiceImplementationFactory; +import org.apache.hivemind.ServiceImplementationFactoryParameters; +import org.apache.hivemind.impl.RegistryImpl; +import org.apache.hivemind.internal.RegistryInfrastructure; +import org.apache.hivemind.internal.ser.ServiceSerializationHelper; + +/** + * Implementation of {@link org.apache.hivemind.ServiceImplementationFactory} + * to create the registry itself. + *
+ *
+ * @author Jochen Zimmermann
+ */
+public class RegistryFactory implements ServiceImplementationFactory
+{
+ public Object createCoreServiceImplementation(
+ ServiceImplementationFactoryParameters factoryParameters)
+ {
+ RegistryInfrastructure r = (RegistryInfrastructure) ServiceSerializationHelper.getServiceSerializationSupport();
+ return new RegistryImpl(r);
+ }
+}
Index: C:/JavaProjects/jakarta-hivemind/framework/src/descriptor/META-INF/hivemodule.xml
===================================================================
--- C:/JavaProjects/jakarta-hivemind/framework/src/descriptor/META-INF/hivemodule.xml (revision 657522)
+++ C:/JavaProjects/jakarta-hivemind/framework/src/descriptor/META-INF/hivemodule.xml (working copy)
@@ -785,6 +785,18 @@
+