jcarman     2005/04/26 19:09:54

  Modified:    framework/src/java/org/apache/hivemind/service/impl
                        BuilderFactoryLogic.java
  Log:
  Bean services cannot be autowired into other services.
  PR: HIVEMIND-108
  
  Revision  Changes    Path
  1.16      +2 -16     
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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- BuilderFactoryLogic.java  27 Apr 2005 02:08:26 -0000      1.15
  +++ BuilderFactoryLogic.java  27 Apr 2005 02:09:53 -0000      1.16
  @@ -386,24 +386,10 @@
       {
           Class propertyType = PropertyUtils.getPropertyType(service, 
propertyName);
   
  -        // Yes, not all interfaces are services, but there's no real way to 
be sure.
  -        // Moral of the story: don't leave around writeable properties that 
are interfaces
  -        // (and therefore look like services)! A future improvement may be 
to ignore
  -        // properties for which there are no service points. This is why 
autowiring
  -        // 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
           {
  +            // Ignore properties for which there are no corresponding
  +            // service points...
               if( _contributingModule.containsService( propertyType ) )
               {
                   Object collaboratingService = 
_contributingModule.getService(propertyType);
  
  
  

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

Reply via email to