You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hivemind.apache.org by hl...@apache.org on 2004/07/19 16:07:37 UTC

cvs commit: jakarta-hivemind/framework/src/java/org/apache/hivemind/service/impl BuilderFactoryLogic.java

hlship      2004/07/19 07:07:37

  Modified:    framework/src/descriptor/META-INF hivemodule.sdl
               framework/src/test/hivemind/test/services/impl
                        StringHolderImpl.java
               framework/src/java/org/apache/hivemind/service/impl
                        BuilderFactoryLogic.java
  Log:
  Woops! BuilderFactory was defaulting autowire-services to false.
  Add a check to ignore writable properties of type Locataion when autowiring services.
  
  Revision  Changes    Path
  1.17      +1 -1      jakarta-hivemind/framework/src/descriptor/META-INF/hivemodule.sdl
  
  Index: hivemodule.sdl
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/descriptor/META-INF/hivemodule.sdl,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- hivemodule.sdl	18 Jul 2004 14:43:12 -0000	1.16
  +++ hivemodule.sdl	19 Jul 2004 14:07:35 -0000	1.17
  @@ -252,7 +252,7 @@
   					create-object (class=org.apache.hivemind.service.impl.BuilderParameter)
   					read-attribute (property=className attribute=class)
   					read-attribute (property=initializeMethod attribute=initialize-method)
  -					read-attribute (property=autowireServices attribute=autowire-services)
  +					read-attribute (property=autowireServices attribute=autowire-services skip-if-null=false)
   					invoke-parent (method=addElement)
   					
   					create-object (class=org.apache.hivemind.service.impl.BuilderMessagesFacet)
  
  
  
  1.4       +8 -1      jakarta-hivemind/framework/src/test/hivemind/test/services/impl/StringHolderImpl.java
  
  Index: StringHolderImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/test/hivemind/test/services/impl/StringHolderImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StringHolderImpl.java	26 Feb 2004 23:07:35 -0000	1.3
  +++ StringHolderImpl.java	19 Jul 2004 14:07:36 -0000	1.4
  @@ -14,9 +14,16 @@
   
   package hivemind.test.services.impl;
   
  +import org.apache.hivemind.impl.BaseLocatable;
  +
   import hivemind.test.services.StringHolder;
   
  -public class StringHolderImpl implements StringHolder
  +/**
  + * Used by various service-building tests.
  + *
  + * @author Howard Lewis Ship
  + */
  +public class StringHolderImpl extends BaseLocatable implements StringHolder
   {
       private String _value;
   
  
  
  
  1.4       +8 -0      jakarta-hivemind/framework/src/java/org/apache/hivemind/service/impl/BuilderFactoryLogic.java
  
  Index: BuilderFactoryLogic.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/service/impl/BuilderFactoryLogic.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BuilderFactoryLogic.java	19 Jul 2004 13:46:02 -0000	1.3
  +++ BuilderFactoryLogic.java	19 Jul 2004 14:07:36 -0000	1.4
  @@ -26,6 +26,7 @@
   import org.apache.hivemind.ClassResolver;
   import org.apache.hivemind.ErrorHandler;
   import org.apache.hivemind.HiveMind;
  +import org.apache.hivemind.Location;
   import org.apache.hivemind.internal.Module;
   import org.apache.hivemind.service.EventLinker;
   import org.apache.hivemind.util.ConstructorUtils;
  @@ -286,6 +287,13 @@
           // can be turned off. 
   
           if (!propertyType.isInterface())
  +            return;
  +
  +		// Here's the problem with autowiring; there can be other stuff besides
  +		// services that are writable; since lots of classes inherite from
  +		// BaseLocatable, Location is one of those property types.
  +		
  +        if (propertyType.equals(Location.class))
               return;
   
           try
  
  
  

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