hlship      2003/09/12 12:27:51

  Modified:    hivemind/xdocs index.xml extension-points.xml case1.xml
                        ioc.xml interceptors.xml
               hivemind/src/java/org/apache/commons/hivemind/impl
                        InterceptorStackImpl.java package.html
                        ServiceExtensionPointImpl.java
               hivemind/src/java/org/apache/commons/hivemind/service/impl
                        BuilderParameter.java NameLookupImpl.java
                        BuilderFactory.java ThreadLocalStorageImpl.java
                        DefaultsSymbolSource.java
                        AbstractServiceInterceptorFactory.java
                        LoggingInterceptorFactory.java
               hivemind/src/test/hivemind/test/services
                        TestThreadLocalStorage.java TestServices.java
               hivemind/src/java/org/apache/commons/hivemind HiveMind.java
                        ServiceExtensionPoint.java Initializable.java
                        HiveMindMessages.properties InterceptorStack.java
               hivemind/src/test/hivemind/test/services/impl
                        CheckInitializeServiceImpl.java
                        FilterLoggingInterceptor.java
               hivemind/src/conf log4j.properties
               hivemind/src/java/org/apache/commons/hivemind/schema/impl
                        package.html
               hivemind/src/java/org/apache/commons/hivemind/schema
                        Translator.java
               hivemind/src/test/hivemind/test TestMisc.java
                        HiveMindTestCase.java
  Log:
  Remove HiveMind.getDefault() and related methods.
  Remove the ServiceExtensionPoint parameter from the 
Initializable.initializeService() method.
  Replace getExtensionPoint() with getServiceExtensionPointId() and getServiceModule() 
(in interface InterceptorStack).
  
  Revision  Changes    Path
  1.10      +2 -2      jakarta-commons-sandbox/hivemind/xdocs/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/xdocs/index.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- index.xml 8 Sep 2003 20:14:18 -0000       1.9
  +++ index.xml 12 Sep 2003 19:27:49 -0000      1.10
  @@ -167,7 +167,7 @@
       </p>
       
       <source><![CDATA[
  -Registry registry = HiveMind.getDefault();
  +Registry registry = . . .;
   MyService service = (MyService) registry.getService("com.mypackage.MyService", 
MyService.class);
   
   service.perform(...);
  
  
  
  1.9       +4 -3      jakarta-commons-sandbox/hivemind/xdocs/extension-points.xml
  
  Index: extension-points.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/xdocs/extension-points.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- extension-points.xml      8 Sep 2003 20:14:18 -0000       1.8
  +++ extension-points.xml      12 Sep 2003 19:27:50 -0000      1.9
  @@ -138,10 +138,11 @@
   
   <section name="Accessing Extension Points">
   
  -<p>Like services, extension points are meant to be easy to access.</p>
  +<p>Like services, extension points are meant to be easy to access (the only trick 
is getting a
  +     reference to the registry to start from).</p>
   
   <source><![CDATA[
  -Registry registry = HiveMind.getDefault();
  +Registry registry = . . .;
   List elements = registry.getExtensionPointElements("com.myco.MyConfig");     
   
   int count = elements.size();
  
  
  
  1.4       +2 -2      jakarta-commons-sandbox/hivemind/xdocs/case1.xml
  
  Index: case1.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/xdocs/case1.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- case1.xml 10 Sep 2003 16:54:52 -0000      1.3
  +++ case1.xml 12 Sep 2003 19:27:50 -0000      1.4
  @@ -758,7 +758,7 @@
       
       public void shutdown() throws RemoteException
       {
  -        Registry registry = HiveMind.getDefault();
  +        Registry registry = OublietteRuntine.getHiveMindRegistry();
   
           if (registry == null)
           {
  
  
  
  1.7       +2 -9      jakarta-commons-sandbox/hivemind/xdocs/ioc.xml
  
  Index: ioc.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/xdocs/ioc.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ioc.xml   8 Sep 2003 20:14:18 -0000       1.6
  +++ ioc.xml   12 Sep 2003 19:27:50 -0000      1.7
  @@ -32,14 +32,7 @@
   
   <p>
   HiveMind is a much looser system than Avalon.  HiveMind doesn't have an explicit 
assembly stage; it wires together
  -all the modules it can find at runtime.  Service implementations may implement the
  -<a href="apidocs/org/apache/commons/hivemind/Initializable.html">Initializable</a>  
 
  -interface, which is essentially a post-creation callback; the implementation can, 
if it likes, look up other
  -services by their well-known ids
  -</p>
  -
  -<p>
  -On the other hand, HiveMind is responsible for creating services (including core 
implementations
  +all the modules it can find at runtime. HiveMind is responsible for creating 
services (including core implementations
   and interceptors).  It is quite possible to create service factories that do very 
container-like things,
   including connecting services together.  
   <a 
href="base-registry/hivemind.html#service:hivemind.BuilderFactory">hivemind.BuilderFactory</a>
    
  
  
  
  1.2       +2 -2      jakarta-commons-sandbox/hivemind/xdocs/interceptors.xml
  
  Index: interceptors.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/xdocs/interceptors.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- interceptors.xml  11 Sep 2003 20:52:05 -0000      1.1
  +++ interceptors.xml  12 Sep 2003 19:27:50 -0000      1.2
  @@ -260,7 +260,7 @@
           Object stackTop = stack.peek();
           Class topClass = stackTop.getClass();
   
  -        Log log = 
LogFactory.getLog(stack.getServiceExtensionPoint().getExtensionPointId());
  +        Log log = LogFactory.getLog(stack.getServiceExtensionPointId());
   
           Constructor c = interceptorClass.getConstructor(new Class[] { Log.class, 
topClass });
   
  
  
  
  1.10      +10 -6     
jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/impl/InterceptorStackImpl.java
  
  Index: InterceptorStackImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/impl/InterceptorStackImpl.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- InterceptorStackImpl.java 11 Sep 2003 20:51:52 -0000      1.9
  +++ InterceptorStackImpl.java 12 Sep 2003 19:27:50 -0000      1.10
  @@ -59,12 +59,11 @@
   
   import org.apache.commons.hivemind.ApplicationRuntimeException;
   import org.apache.commons.hivemind.HiveMind;
  -import org.apache.commons.hivemind.ClassResolver;
  -import org.apache.commons.hivemind.ServiceInterceptorContribution;
  -import org.apache.commons.hivemind.ServiceInterceptorFactory;
   import org.apache.commons.hivemind.InterceptorStack;
  +import org.apache.commons.hivemind.Module;
   import org.apache.commons.hivemind.Registry;
   import org.apache.commons.hivemind.ServiceExtensionPoint;
  +import org.apache.commons.hivemind.ServiceInterceptorContribution;
   import org.apache.commons.lang.builder.ToStringBuilder;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  @@ -104,9 +103,14 @@
           return builder.toString();
       }
   
  -    public ServiceExtensionPoint getServiceExtensionPoint()
  +    public String getServiceExtensionPointId()
  +    {
  +        return _sep.getExtensionPointId();
  +    }
  +
  +    public Module getServiceModule()
       {
  -        return _sep;
  +        return _sep.getModule();
       }
   
       public Class getServiceInterface()
  
  
  
  1.2       +2 -2      
jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/impl/package.html
  
  Index: package.html
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/impl/package.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package.html      2 Sep 2003 21:13:04 -0000       1.1
  +++ package.html      12 Sep 2003 19:27:50 -0000      1.2
  @@ -2,7 +2,7 @@
   
   <body>
   
  -Implementations of interfaces defined in the [EMAIL PROTECTED] 
org.apache.commons.hivemind} package.
  +Implementations of interfaces defined in the org.apache.commons.hivemind package.
   In addition, the [EMAIL PROTECTED] 
org.apache.commons.hivemind.impl.RegistryBuilder} is here.
   
   </body>
  
  
  
  1.15      +2 -2      
jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/impl/ServiceExtensionPointImpl.java
  
  Index: ServiceExtensionPointImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/impl/ServiceExtensionPointImpl.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ServiceExtensionPointImpl.java    2 Sep 2003 21:13:04 -0000       1.14
  +++ ServiceExtensionPointImpl.java    12 Sep 2003 19:27:50 -0000      1.15
  @@ -256,7 +256,7 @@
               if (core instanceof Initializable)
               {
                   Initializable initializeCore = (Initializable) core;
  -                initializeCore.initializeService(this, intercepted);
  +                initializeCore.initializeService(intercepted);
               }
   
               return intercepted;
  
  
  
  1.5       +2 -2      
jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/BuilderParameter.java
  
  Index: BuilderParameter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/BuilderParameter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BuilderParameter.java     30 Aug 2003 14:29:54 -0000      1.4
  +++ BuilderParameter.java     12 Sep 2003 19:27:50 -0000      1.5
  @@ -67,7 +67,7 @@
    * @author Howard Lewis Ship
    * @version $Id$
    */
  -public class BuilderParameter extends BuilderFactory
  +public class BuilderParameter
   {
        private String _className;
        private List _properties = new ArrayList();
  
  
  
  1.7       +2 -3      
jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/NameLookupImpl.java
  
  Index: NameLookupImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/NameLookupImpl.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- NameLookupImpl.java       5 Sep 2003 15:04:41 -0000       1.6
  +++ NameLookupImpl.java       12 Sep 2003 19:27:50 -0000      1.7
  @@ -66,7 +66,6 @@
   import org.apache.commons.hivemind.ApplicationRuntimeException;
   import org.apache.commons.hivemind.HiveMind;
   import org.apache.commons.hivemind.Initializable;
  -import org.apache.commons.hivemind.ServiceExtensionPoint;
   import org.apache.commons.hivemind.service.NameLookup;
   import org.apache.commons.hivemind.service.RemoteExceptionCoordinator;
   import org.apache.commons.hivemind.service.RemoteExceptionEvent;
  @@ -151,7 +150,7 @@
           return new InitialContext(properties);
       }
   
  -    public void initializeService(ServiceExtensionPoint point, Object service)
  +    public void initializeService(Object service)
       {
           _coordinator.addRemoteExceptionListener(this);
       }
  
  
  
  1.5       +7 -16     
jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/BuilderFactory.java
  
  Index: BuilderFactory.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/BuilderFactory.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BuilderFactory.java       30 Aug 2003 14:29:53 -0000      1.4
  +++ BuilderFactory.java       12 Sep 2003 19:27:50 -0000      1.5
  @@ -61,9 +61,8 @@
   
   import org.apache.commons.beanutils.PropertyUtils;
   import org.apache.commons.hivemind.ApplicationRuntimeException;
  -import org.apache.commons.hivemind.HiveMind;
   import org.apache.commons.hivemind.ClassResolver;
  -import org.apache.commons.hivemind.Initializable;
  +import org.apache.commons.hivemind.HiveMind;
   import org.apache.commons.hivemind.Module;
   import org.apache.commons.hivemind.ServiceExtensionPoint;
   import org.apache.commons.hivemind.ServiceImplementationFactory;
  @@ -92,20 +91,18 @@
    * @author Howard Lewis Ship
    * @version $Id$
    */
  -public class BuilderFactory implements ServiceImplementationFactory, Initializable
  +public class BuilderFactory implements ServiceImplementationFactory
   {
  -    private static final Log LOG = LogFactory.getLog(BuilderFactory.class);
  -    /**
  -     * SEP for BuilderFactory.
  -     */
  -    private ServiceExtensionPoint _point;
  +    private static final String POINT_ID = "hivemind.BuilderFactory";
  +
  +    private static final Log LOG = LogFactory.getLog(POINT_ID);
   
       public Object createCoreServiceImplementation(
           ServiceExtensionPoint point,
           Module invokingModule,
           List parameters)
       {
  -        HiveMind.checkFactoryParameterCount(_point.getExtensionPointId(), 
parameters, 1);
  +        HiveMind.checkFactoryParameterCount(POINT_ID, parameters, 1);
   
           BuilderParameter parameter = (BuilderParameter) parameters.get(0);
   
  @@ -172,10 +169,4 @@
                   ex);
           }
       }
  -
  -    public void initializeService(ServiceExtensionPoint point, Object service)
  -    {
  -        _point = point;
  -    }
  -
   }
  
  
  
  1.4       +3 -4      
jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/ThreadLocalStorageImpl.java
  
  Index: ThreadLocalStorageImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/ThreadLocalStorageImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ThreadLocalStorageImpl.java       30 Aug 2003 14:29:54 -0000      1.3
  +++ ThreadLocalStorageImpl.java       12 Sep 2003 19:27:50 -0000      1.4
  @@ -61,7 +61,6 @@
   import java.util.Map;
   
   import org.apache.commons.hivemind.Initializable;
  -import org.apache.commons.hivemind.ServiceExtensionPoint;
   import org.apache.commons.hivemind.service.ThreadCleanupListener;
   import org.apache.commons.hivemind.service.ThreadEventNotifier;
   import org.apache.commons.hivemind.service.ThreadLocalStorage;
  @@ -119,7 +118,7 @@
        * Initializes the service; the implementation registers itself
        * with the [EMAIL PROTECTED] ThreadEventNotifier} as a [EMAIL PROTECTED] 
ThreadCleanupListener}.
        */
  -    public void initializeService(ServiceExtensionPoint point, Object service)
  +    public void initializeService(Object service)
       {
           _notifier.addThreadCleanupListener(this);
       }
  @@ -129,7 +128,7 @@
        */
       public void threadDidCleanup()
       {
  -             clear();
  +        clear();
       }
   
   }
  
  
  
  1.4       +2 -3      
jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/DefaultsSymbolSource.java
  
  Index: DefaultsSymbolSource.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/DefaultsSymbolSource.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultsSymbolSource.java 30 Aug 2003 14:29:53 -0000      1.3
  +++ DefaultsSymbolSource.java 12 Sep 2003 19:27:50 -0000      1.4
  @@ -64,7 +64,6 @@
   import org.apache.commons.hivemind.HiveMind;
   import org.apache.commons.hivemind.Initializable;
   import org.apache.commons.hivemind.Location;
  -import org.apache.commons.hivemind.ServiceExtensionPoint;
   import org.apache.commons.hivemind.SymbolSource;
   import org.apache.commons.hivemind.impl.BaseLocatable;
   import org.apache.commons.logging.Log;
  @@ -87,7 +86,7 @@
           return (String) _symbols.get(name);
       }
   
  -    public void initializeService(ServiceExtensionPoint point, Object service)
  +    public void initializeService(Object service)
       {
           Map symbolMap = new HashMap();
   
  
  
  
  1.17      +7 -7      
jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/AbstractServiceInterceptorFactory.java
  
  Index: AbstractServiceInterceptorFactory.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/AbstractServiceInterceptorFactory.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- AbstractServiceInterceptorFactory.java    11 Sep 2003 14:24:30 -0000      1.16
  +++ AbstractServiceInterceptorFactory.java    12 Sep 2003 19:27:50 -0000      1.17
  @@ -128,7 +128,7 @@
                       new Object[] {
                           _extensionId,
                           serviceInterfaceClass.getName(),
  -                        stack.getServiceExtensionPoint().getExtensionPointId(),
  +                        stack.getServiceExtensionPointId(),
                           interceptorClass.getName(),
                           ex.getMessage()}),
                   ex);
  @@ -137,7 +137,7 @@
   
       private Class getInterceptorClass(InterceptorStack stack)
       {
  -        String id = stack.getServiceExtensionPoint().getExtensionPointId();
  +        String id = stack.getServiceExtensionPointId();
           Class result = (Class) _cachedClasses.get(id);
   
           if (result != null)
  @@ -153,7 +153,7 @@
       private Class constructInterceptorClass(InterceptorStack stack)
       {
           Class serviceInterfaceClass = stack.getServiceInterface();
  -        Module module = stack.getServiceExtensionPoint().getModule();
  +        Module module = stack.getServiceModule();
   
           String name = ClassFabUtils.generateClassName("Interceptor");
   
  @@ -197,14 +197,14 @@
       /**
        * Used to instantiate the interceptor.  This implementation passes the top 
object
        * on the interceptor stack to the interceptorClass' constructor. Subclasses 
that
  -     * defined a different constructor (in [EMAIL PROTECTED] 
#createInfrastructure(Class, ClassFab)})
  +     * defined a different constructor (in [EMAIL PROTECTED] 
#createInfrastructure(InterceptorStack, ClassFab)})
        * will need to override this method as well.
        * 
        * @param stack the interceptor stack on which the returned interceptor will be 
placed.
        * @param interceptorClass the generated class for the interceptor.
        * 
        * @throws Exception if there is an error getting or invoking the constructor
  -     * @see #createInfrastructure(Class, ClassFab)
  +     * @see #createInfrastructure(InterceptorStack, ClassFab)
        */
       protected Object instantiateInterceptor(InterceptorStack stack, Class 
interceptorClass)
           throws Exception
  @@ -263,7 +263,7 @@
               "<Interceptor: "
                   + _extensionId
                   + " for "
  -                + stack.getServiceExtensionPoint().getExtensionPointId()
  +                + stack.getServiceExtensionPointId()
                   + "("
                   + stack.getServiceInterface().getName()
                   + ")>");
  
  
  
  1.12      +2 -2      
jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/LoggingInterceptorFactory.java
  
  Index: LoggingInterceptorFactory.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/LoggingInterceptorFactory.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- LoggingInterceptorFactory.java    11 Sep 2003 20:51:52 -0000      1.11
  +++ LoggingInterceptorFactory.java    12 Sep 2003 19:27:50 -0000      1.12
  @@ -104,7 +104,7 @@
           Object stackTop = stack.peek();
           Class topClass = stackTop.getClass();
   
  -        Log log = 
LogFactory.getLog(stack.getServiceExtensionPoint().getExtensionPointId());
  +        Log log = LogFactory.getLog(stack.getServiceExtensionPointId());
   
           Constructor c = interceptorClass.getConstructor(new Class[] { Log.class, 
topClass });
   
  
  
  
  1.4       +2 -2      
jakarta-commons-sandbox/hivemind/src/test/hivemind/test/services/TestThreadLocalStorage.java
  
  Index: TestThreadLocalStorage.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/test/hivemind/test/services/TestThreadLocalStorage.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestThreadLocalStorage.java       30 Aug 2003 14:29:55 -0000      1.3
  +++ TestThreadLocalStorage.java       12 Sep 2003 19:27:50 -0000      1.4
  @@ -115,7 +115,7 @@
           ThreadLocalStorageImpl s = new ThreadLocalStorageImpl();
   
           s.setNotifier(notifier);
  -        s.initializeService(null, s);
  +        s.initializeService(s);
   
           s.put("biff", "bamf");
   
  
  
  
  1.27      +3 -3      
jakarta-commons-sandbox/hivemind/src/test/hivemind/test/services/TestServices.java
  
  Index: TestServices.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/test/hivemind/test/services/TestServices.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- TestServices.java 5 Sep 2003 22:32:38 -0000       1.26
  +++ TestServices.java 12 Sep 2003 19:27:50 -0000      1.27
  @@ -411,7 +411,7 @@
       {
           Registry r = buildRegistry("BuilderAccessFailure.xml");
   
  -        interceptLogging();
  +        interceptLogging("hivemind.BuilderFactory");
   
           BuilderAccess s =
               (BuilderAccess) r.getService(
  @@ -426,7 +426,7 @@
           s.getExtensionPointId();
   
           checkLoggingEvent(
  -            BuilderFactory.class.getName(),
  +            "hivemind.BuilderFactory",
               "Unable to set property EVIL of [EMAIL PROTECTED]: Unknown property 
'EVIL'",
               false);
       }
  
  
  
  1.19      +1 -37     
jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/HiveMind.java
  
  Index: HiveMind.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/HiveMind.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- HiveMind.java     30 Aug 2003 14:29:52 -0000      1.18
  +++ HiveMind.java     12 Sep 2003 19:27:50 -0000      1.19
  @@ -79,7 +79,6 @@
   {
       private static final Log LOG = LogFactory.getLog(HiveMind.class);
   
  -    private static Registry _registry;
       private static final ResourceBundle _bundle;
   
       static {
  @@ -89,41 +88,6 @@
       private HiveMind()
       {
           // Prevent instantiation
  -    }
  -
  -    /**
  -     * Sets the default [EMAIL PROTECTED] Registry} instance used by the 
application.
  -     */
  -    public static synchronized void setDefault(Registry registry)
  -    {
  -        if (LOG.isDebugEnabled())
  -            LOG.debug("setDefault(" + registry + ")");
  -
  -        _registry = registry;
  -    }
  -
  -    /**
  -     * Returns the default [EMAIL PROTECTED] Registry}, previously set
  -     * by [EMAIL PROTECTED] #setDefault(Registry)}.
  -     * 
  -     * @throws ApplicationRuntimeException if the default registry has not yet
  -     * been set.
  -     */
  -    public static synchronized Registry getDefault()
  -    {
  -        if (_registry == null)
  -            throw new ApplicationRuntimeException(
  -                HiveMind.getMessage("HiveMind.default-registry-not-set"));
  -
  -        return _registry;
  -    }
  -
  -    /**
  -     * Returns true if the shared registry is not null.
  -     */
  -    public static boolean isInitialized()
  -    {
  -        return _registry != null;
       }
   
       public static String getMessage(String key)
  
  
  
  1.8       +2 -2      
jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/ServiceExtensionPoint.java
  
  Index: ServiceExtensionPoint.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/ServiceExtensionPoint.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ServiceExtensionPoint.java        2 Sep 2003 21:13:03 -0000       1.7
  +++ ServiceExtensionPoint.java        12 Sep 2003 19:27:50 -0000      1.8
  @@ -85,7 +85,7 @@
        * <p>Once the core implementation is created and the interceptor
        * stack is assembled, the core implementation is checked
        * to see if it implements [EMAIL PROTECTED] Initializable}.
  -     * If so [EMAIL PROTECTED] 
Initializable#initializeService(ServiceExtensionPoint, Object)}
  +     * If so [EMAIL PROTECTED] Initializable#initializeService(Object)}
        * is invoked, to let the core service implementation
        * initialize.
        * 
  
  
  
  1.4       +2 -4      
jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/Initializable.java
  
  Index: Initializable.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/Initializable.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Initializable.java        30 Aug 2003 14:29:52 -0000      1.3
  +++ Initializable.java        12 Sep 2003 19:27:50 -0000      1.4
  @@ -78,10 +78,8 @@
       /**
        * Invoked after the core implementation is instantiated, and the interceptor
        * stack has been created.
  -     * @param point the service extension point the core service was created for.
  -     * @param factoryContribution the contribution which created the core 
implementation.
        * @param service the outside representation of the service, this may be the
        * same as the receiver, or can be the outermost interceptor.
        */
  -    public void initializeService(ServiceExtensionPoint point, Object service);
  +    public void initializeService(Object service);
   }
  
  
  
  1.28      +1 -2      
jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/HiveMindMessages.properties
  
  Index: HiveMindMessages.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/HiveMindMessages.properties,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- HiveMindMessages.properties       8 Sep 2003 20:14:18 -0000       1.27
  +++ HiveMindMessages.properties       12 Sep 2003 19:27:50 -0000      1.28
  @@ -9,7 +9,6 @@
   
   wrong-factory-parameter-count=Service implementation factory {0} expects 
{1,choice,0#no parameters|1#one parameter|1<{1,number,integer} parameters} but 
received {2,choice,0#none|1#one|1<{2,number,integer}}.
   
  -HiveMind.default-registry-not-set=HiveMind.getDefault() invoked before default 
registry has been set.
   HiveMind.elements-not-orderable=Elements of list {0} do not implement the Orderable 
interface and can not be sorted.
   
   # impl package
  
  
  
  1.7       +11 -4     
jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/InterceptorStack.java
  
  Index: InterceptorStack.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/InterceptorStack.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- InterceptorStack.java     11 Sep 2003 20:51:52 -0000      1.6
  +++ InterceptorStack.java     12 Sep 2003 19:27:50 -0000      1.7
  @@ -67,10 +67,17 @@
   public interface InterceptorStack
   {    
        /**
  -      * Returns the extension point for which the stack
  -      * is assembling interceptors. 
  +      * Return the full id of the service extension point for which
  +      * interceptors are being fabricated.
         */
  -     public ServiceExtensionPoint getServiceExtensionPoint();
  +     
  +     public String getServiceExtensionPointId();
  +     
  +     /**
  +      * Returns the module which contains the service extension point.
  +      */
  +     
  +     public Module getServiceModule();
        
        /**
         * Returns the interface for the service; the same
  
  
  
  1.4       +2 -3      
jakarta-commons-sandbox/hivemind/src/test/hivemind/test/services/impl/CheckInitializeServiceImpl.java
  
  Index: CheckInitializeServiceImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/test/hivemind/test/services/impl/CheckInitializeServiceImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CheckInitializeServiceImpl.java   30 Aug 2003 14:29:54 -0000      1.3
  +++ CheckInitializeServiceImpl.java   12 Sep 2003 19:27:50 -0000      1.4
  @@ -60,7 +60,6 @@
   import hivemind.test.services.CheckInitializeService;
   
   import org.apache.commons.hivemind.Initializable;
  -import org.apache.commons.hivemind.ServiceExtensionPoint;
   
   /**
    * Used for testing support of [EMAIL PROTECTED] 
org.apache.commons.hivemind.Initializable}.
  @@ -72,7 +71,7 @@
   {
       private boolean _didInitialize;
   
  -    public void initializeService(ServiceExtensionPoint point, Object service)
  +    public void initializeService(Object service)
       {
           _didInitialize = true;
       }
  
  
  
  1.2       +3 -3      
jakarta-commons-sandbox/hivemind/src/test/hivemind/test/services/impl/FilterLoggingInterceptor.java
  
  Index: FilterLoggingInterceptor.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/test/hivemind/test/services/impl/FilterLoggingInterceptor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FilterLoggingInterceptor.java     5 Sep 2003 22:32:38 -0000       1.1
  +++ FilterLoggingInterceptor.java     12 Sep 2003 19:27:50 -0000      1.2
  @@ -106,7 +106,7 @@
               _classFactory.newClass(
                   name,
                   AbstractLoggingInterceptor.class,
  -                stack.getServiceExtensionPoint().getModule());
  +                stack.getServiceModule());
   
           classFab.addInterface(serviceInterfaceClass);
           classFab.addField("_inner", serviceInterfaceClass);
  @@ -155,7 +155,7 @@
   
           Class interceptorClass = classFab.createClass();
   
  -        Log log = 
LogFactory.getLog(stack.getServiceExtensionPoint().getExtensionPointId());
  +        Log log = LogFactory.getLog(stack.getServiceExtensionPointId());
   
           Object interceptor = null;
   
  
  
  
  1.3       +1 -4      jakarta-commons-sandbox/hivemind/src/conf/log4j.properties
  
  Index: log4j.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/src/conf/log4j.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- log4j.properties  29 Jul 2003 22:20:49 -0000      1.2
  +++ log4j.properties  12 Sep 2003 19:27:50 -0000      1.3
  @@ -10,6 +10,3 @@
   log4j.appender.A1.layout.ConversionPattern=%r %c{1} [%p] %m%n
   
   #log4j.category.org.apache.commons.hivemind=debug
  -
  -log4j.category.org.apache.commons.digester.Digester=debug
  -log4j.category.org.apache.commons.digester.Digester.sax=off
  \ No newline at end of file
  
  
  
  1.2       +3 -2      
jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/schema/impl/package.html
  
  Index: package.html
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/schema/impl/package.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package.html      2 Sep 2003 21:13:04 -0000       1.1
  +++ package.html      12 Sep 2003 19:27:51 -0000      1.2
  @@ -1,5 +1,6 @@
   <!-- $Id$ -->
   
   <body>
  -Implementations of schema-related intefaces defined in [EMAIL PROTECTED] 
org.apache.commons.hivemind.schema}.        
  +Implementations of schema-related intefaces defined in packagte
  +org.apache.commons.hivemind.schema.  
   </body>
  
  
  
  1.5       +3 -2      
jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/schema/Translator.java
  
  Index: Translator.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/schema/Translator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Translator.java   8 Sep 2003 20:14:19 -0000       1.4
  +++ Translator.java   12 Sep 2003 19:27:51 -0000      1.5
  @@ -87,7 +87,8 @@
   public interface Translator
   {
        /**
  -      * Invoked by a [EMAIL PROTECTED] Rule} to translate an inputValue into an 
appropriate object.
  +      * Invoked by a [EMAIL PROTECTED] org.apache.commons.hivemind.schema.Rule} 
  +      * to translate an inputValue into an appropriate object.
         * Substitution symbols will already have been expanded before this method is
         * invoked.
         */
  
  
  
  1.6       +1 -28     
jakarta-commons-sandbox/hivemind/src/test/hivemind/test/TestMisc.java
  
  Index: TestMisc.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/test/hivemind/test/TestMisc.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestMisc.java     30 Aug 2003 14:29:52 -0000      1.5
  +++ TestMisc.java     12 Sep 2003 19:27:51 -0000      1.6
  @@ -103,33 +103,6 @@
           assertSame(t, ev.getException());
       }
   
  -    public void testHiveMindGetDefault()
  -    {
  -        assertEquals(false, HiveMind.isInitialized());
  -
  -        try
  -        {
  -            HiveMind.getDefault();
  -            unreachable();
  -        }
  -        catch (ApplicationRuntimeException ex)
  -        {
  -            checkException(
  -                ex,
  -                "HiveMind.getDefault() invoked before default registry has been 
set.");
  -        }
  -    }
  -
  -    public void testHiveMindSetDefault()
  -    {
  -        Registry r = new RegistryImpl(Locale.getDefault());
  -
  -        HiveMind.setDefault(r);
  -
  -        assertSame(r, HiveMind.getDefault());
  -        assertEquals(true, HiveMind.isInitialized());
  -    }
  -
       public void testCheckFactoryParameterCountFailure()
       {
           try
  
  
  
  1.21      +1 -4      
jakarta-commons-sandbox/hivemind/src/test/hivemind/test/HiveMindTestCase.java
  
  Index: HiveMindTestCase.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/test/hivemind/test/HiveMindTestCase.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- HiveMindTestCase.java     8 Sep 2003 20:14:18 -0000       1.20
  +++ HiveMindTestCase.java     12 Sep 2003 19:27:51 -0000      1.21
  @@ -215,8 +215,6 @@
   
       protected void tearDown() throws Exception
       {
  -        HiveMind.setDefault(null);
  -
           if (_appender != null)
           {
               _appender = null;
  @@ -284,7 +282,6 @@
               checkLoggingEvent(name, messages[i], events, i);
           }
       }
  -    
   
       /**
        * Checks to see if any logging event matches a given regexp pattern.
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to