commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject cvs commit: jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl AbstractServiceInterceptorFactory.java
Date Fri, 01 Aug 2003 18:25:33 GMT
hlship      2003/08/01 11:25:33

  Modified:    hivemind/src/java/org/apache/commons/hivemind/service/impl
                        AbstractServiceInterceptorFactory.java
  Log:
  Change the naming of generated Interceptor classes to help ensure uniqueness.
  
  Revision  Changes    Path
  1.3       +4 -6      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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractServiceInterceptorFactory.java	15 Jul 2003 17:36:19 -0000	1.2
  +++ AbstractServiceInterceptorFactory.java	1 Aug 2003 18:25:33 -0000	1.3
  @@ -83,13 +83,13 @@
       private ClassFactory _factory;
       private String _extensionId;
       private String _baseName;
  -    private int _uid;
  +    private static int _uid;
   
       public void createInterceptor(InterceptorStack stack)
       {
           Class serviceInterfaceClass = stack.getServiceInterface();
   
  -        String name = _baseName + _uid++;
  +        String name ="$Interceptor_" + Long.toHexString(System.currentTimeMillis()) + "$"
+ _uid++;
   
           ClassFab classFab = _factory.newClass(name, getInterceptorSuperclass());
   
  @@ -135,10 +135,8 @@
       {
           _extensionId = point.getExtensionPointId();
   
  -        _baseName = _extensionId.replace('.', '$') + "$interceptor_";
  -
           _factory =
  -            (ClassFactory) point.getModule().getRegistry().getService(
  +            (ClassFactory)point.getModule().getRegistry().getService(
                   HiveMind.CLASS_FACTORY_SERVICE_ID,
                   ClassFactory.class);
       }
  
  
  

Mime
View raw message