hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject cvs commit: jakarta-hivemind/framework/src/java/org/apache/hivemind/impl InterceptorStackImpl.java
Date Sat, 19 Jun 2004 14:19:01 GMT
hlship      2004/06/19 07:19:01

  Modified:    framework/src/java/org/apache/hivemind/impl/servicemodel
                        AbstractServiceModelImpl.java
                        SingletonServiceModel.java
                        ThreadedServiceModel.java PooledServiceModel.java
               framework/src/test/hivemind/test/services TestServices.java
                        TestThreadedModel.java
               framework/src/test/hivemind/test/parse TestToString.java
               framework/src/java/org/apache/hivemind/impl
                        InterceptorStackImpl.java
  Log:
  Tweak debug output for service creation.
  
  Revision  Changes    Path
  1.6       +2 -2      jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/servicemodel/AbstractServiceModelImpl.java
  
  Index: AbstractServiceModelImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/servicemodel/AbstractServiceModelImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractServiceModelImpl.java	5 Jun 2004 19:09:13 -0000	1.5
  +++ AbstractServiceModelImpl.java	19 Jun 2004 14:19:01 -0000	1.6
  @@ -59,7 +59,7 @@
           if (count == 0)
               return core;
   
  -        InterceptorStackImpl stack = new InterceptorStackImpl(_servicePoint, core);
  +        InterceptorStackImpl stack = new InterceptorStackImpl(_log, _servicePoint, core);
   
           // They are sorted into runtime execution order. Since we build from the
           // core service impl outwarads, we have to reverse the runtime execution
  @@ -93,7 +93,7 @@
       {
           if (_log.isDebugEnabled())
               _log.debug(
  -                "Constructing core instance for service " + _servicePoint.getExtensionPointId());
  +                "Constructing core service implementation for service " + _servicePoint.getExtensionPointId());
   
           Class serviceType = _servicePoint.getServiceInterface();
           ServiceImplementationConstructor constructor = _servicePoint.getServiceConstructor();
  
  
  
  1.6       +5 -1      jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/servicemodel/SingletonServiceModel.java
  
  Index: SingletonServiceModel.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/servicemodel/SingletonServiceModel.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SingletonServiceModel.java	12 Jun 2004 18:43:41 -0000	1.5
  +++ SingletonServiceModel.java	19 Jun 2004 14:19:01 -0000	1.6
  @@ -77,6 +77,10 @@
        */
       private Object createSingletonProxy()
       {
  +        if (_log.isDebugEnabled())
  +            _log.debug(
  +                "Creating SingletonProxy for service " + getServicePoint().getExtensionPointId());
  +
           try
           {
   
  
  
  
  1.6       +4 -0      jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/servicemodel/ThreadedServiceModel.java
  
  Index: ThreadedServiceModel.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/servicemodel/ThreadedServiceModel.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ThreadedServiceModel.java	5 Jun 2004 19:09:13 -0000	1.5
  +++ ThreadedServiceModel.java	19 Jun 2004 14:19:01 -0000	1.6
  @@ -114,6 +114,10 @@
        */
       private Object createServiceProxy()
       {
  +        if (_log.isDebugEnabled())
  +            _log.debug(
  +                "Creating ThreadedProxy for service " + getServicePoint().getExtensionPointId());
  +
           return ProxyUtils.createDelegatingProxy(
               "ThreadedProxy",
               this,
  
  
  
  1.6       +4 -0      jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/servicemodel/PooledServiceModel.java
  
  Index: PooledServiceModel.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/servicemodel/PooledServiceModel.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PooledServiceModel.java	5 Jun 2004 19:09:13 -0000	1.5
  +++ PooledServiceModel.java	19 Jun 2004 14:19:01 -0000	1.6
  @@ -130,6 +130,10 @@
   
       private Object constructServiceProxy()
       {
  +        if (_log.isDebugEnabled())
  +            _log.debug(
  +                "Creating PooledProxy for service " + getServicePoint().getExtensionPointId());
  +
           return ProxyUtils.createDelegatingProxy(
               "PooledProxy",
               this,
  
  
  
  1.17      +10 -4     jakarta-hivemind/framework/src/test/hivemind/test/services/TestServices.java
  
  Index: TestServices.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/test/hivemind/test/services/TestServices.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- TestServices.java	15 Jun 2004 13:42:33 -0000	1.16
  +++ TestServices.java	19 Jun 2004 14:19:01 -0000	1.17
  @@ -124,7 +124,9 @@
   
           assertLoggedMessages(
               new String[] {
  -                "Constructing core instance for service hivemind.test.services.Demo",
  +                "Creating SingletonProxy for service hivemind.test.services.Demo",
  +                "Constructing core service implementation for service hivemind.test.services.Demo",
  +                "Applying interceptor factory hivemind.LoggingInterceptor",
                   "BEGIN add(5, 3)",
                   "END add() [8]" });
   
  @@ -165,7 +167,9 @@
   
           assertLoggedMessages(
               new String[] {
  -                "Constructing core instance for service hivemind.test.services.Demo",
  +                "Creating SingletonProxy for service hivemind.test.services.Demo",
  +                "Constructing core service implementation for service hivemind.test.services.Demo",
  +                "Applying interceptor factory hivemind.LoggingInterceptor",
                   "BEGIN add(5, 3)",
                   "END add() [8]" });
   
  @@ -362,7 +366,9 @@
   
           assertLoggedMessages(
               new String[] {
  -                "Constructing core instance for service hivemind.test.services.Bedrock",
  +                "Creating SingletonProxy for service hivemind.test.services.Bedrock",
  +                "Constructing core service implementation for service hivemind.test.services.Bedrock",
  +                "Applying interceptor factory hivemind.test.services.FilterLoggingInterceptor",
                   "BEGIN fred()",
                   "BEGIN wilma()" });
       }
  
  
  
  1.10      +8 -4      jakarta-hivemind/framework/src/test/hivemind/test/services/TestThreadedModel.java
  
  Index: TestThreadedModel.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/test/hivemind/test/services/TestThreadedModel.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TestThreadedModel.java	18 May 2004 15:34:01 -0000	1.9
  +++ TestThreadedModel.java	19 Jun 2004 14:19:01 -0000	1.10
  @@ -73,14 +73,16 @@
   
           assertLoggedMessages(
               new String[] {
  -                "Constructing core instance for service hivemind.test.services.StringHolder",
  +                "Constructing core service implementation for service hivemind.test.services.StringHolder",
  +                "Applying interceptor factory hivemind.LoggingInterceptor",
                   "BEGIN getValue()",
                   "END getValue() [<null>]",
                   "BEGIN setValue(fred)",
                   "END setValue()",
                   "BEGIN getValue()",
                   "END getValue() [fred]",
  -                "Constructing core instance for service hivemind.test.services.StringHolder",
  +                "Constructing core service implementation for service hivemind.test.services.StringHolder",
  +                "Applying interceptor factory hivemind.LoggingInterceptor",
                   "BEGIN getValue()",
                   "END getValue() [<null>]" });
   
  @@ -124,14 +126,16 @@
   
           assertLoggedMessages(
               new String[] {
  -                "Constructing core instance for service hivemind.test.services.StringHolder",
  +                "Constructing core service implementation for service hivemind.test.services.StringHolder",
  +                "Applying interceptor factory hivemind.LoggingInterceptor",
                   "BEGIN getValue()",
                   "END getValue() [<null>]",
                   "BEGIN setValue(fred)",
                   "END setValue()",
                   "BEGIN getValue()",
                   "END getValue() [fred]",
  -                "Constructing core instance for service hivemind.test.services.StringHolder",
  +                "Constructing core service implementation for service hivemind.test.services.StringHolder",
  +                "Applying interceptor factory hivemind.LoggingInterceptor",
                   "BEGIN getValue()",
                   "END getValue() [<null>]",
                   "BEGIN setValue(barney)",
  
  
  
  1.13      +2 -2      jakarta-hivemind/framework/src/test/hivemind/test/parse/TestToString.java
  
  Index: TestToString.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/test/hivemind/test/parse/TestToString.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TestToString.java	10 Jun 2004 19:49:40 -0000	1.12
  +++ TestToString.java	19 Jun 2004 14:19:01 -0000	1.13
  @@ -73,6 +73,6 @@
           new AttributeImpl("foo", "bar").toString();
           new ServiceInterceptorContributionImpl().toString();
           new ServicePointImpl().toString();
  -        new InterceptorStackImpl(mockServicePoint, null).toString();
  +        new InterceptorStackImpl(null, mockServicePoint, null).toString();
       }
   }
  
  
  
  1.5       +5 -8      jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/InterceptorStackImpl.java
  
  Index: InterceptorStackImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/InterceptorStackImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- InterceptorStackImpl.java	5 Jun 2004 19:09:12 -0000	1.4
  +++ InterceptorStackImpl.java	19 Jun 2004 14:19:01 -0000	1.5
  @@ -32,15 +32,16 @@
    */
   public final class InterceptorStackImpl implements InterceptorStack
   {
  -    private static final Log LOG = LogFactory.getLog(InterceptorStackImpl.class);
  +    private final Log _log;
   
       private ServiceInterceptorContribution _contribution;
       private ServicePoint _sep;
       private Class _interfaceClass;
       private Object _top;
   
  -    public InterceptorStackImpl(ServicePoint sep, Object root)
  +    public InterceptorStackImpl(Log log, ServicePoint sep, Object root)
       {
  +        _log = log;
           _sep = sep;
           _top = root;
           _interfaceClass = sep.getServiceInterface();
  @@ -105,12 +106,8 @@
   
       public void process(ServiceInterceptorContribution contribution)
       {
  -        if (LOG.isDebugEnabled())
  -            LOG.debug(
  -                "Applying interceptor factory "
  -                    + contribution.getFactoryServiceId()
  -                    + " to "
  -                    + _top);
  +        if (_log.isDebugEnabled())
  +            _log.debug("Applying interceptor factory " + contribution.getFactoryServiceId());
   
           // And now we can finally do this!
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-cvs-help@jakarta.apache.org


Mime
View raw message