You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hivemind.apache.org by ah...@apache.org on 2007/01/19 23:35:20 UTC

svn commit: r497982 - in /hivemind/hivemind2/trunk: framework/src/java/org/apache/hivemind/service/impl/ xml/src/java/org/apache/hivemind/service/impl/

Author: ahuegen
Date: Fri Jan 19 14:35:19 2007
New Revision: 497982

URL: http://svn.apache.org/viewvc?view=rev&rev=497982
Log:
Error message for unknown explicit constructors fixed

Modified:
    hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/ServiceMessages.java
    hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/ServiceStrings.properties
    hivemind/hivemind2/trunk/xml/src/java/org/apache/hivemind/service/impl/BuilderFactoryLogic.java

Modified: hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/ServiceMessages.java
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/ServiceMessages.java?view=diff&rev=497982&r1=497981&r2=497982
==============================================================================
--- hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/ServiceMessages.java (original)
+++ hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/ServiceMessages.java Fri Jan 19 14:35:19 2007
@@ -157,6 +157,11 @@
     {
         return _formatter.getMessage("unable-to-find-autowire-constructor");
     }
+    
+    static String unableToFindExplicitConstructor()
+    {
+        return _formatter.getMessage("unable-to-find-explicit-constructor");
+    }
 
     /** @since 1.1 */
     static String unableToCreateInterface(String name, Exception cause)

Modified: hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/ServiceStrings.properties
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/ServiceStrings.properties?view=diff&rev=497982&r1=497981&r2=497982
==============================================================================
--- hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/ServiceStrings.properties (original)
+++ hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/service/impl/ServiceStrings.properties Fri Jan 19 14:35:19 2007
@@ -36,5 +36,6 @@
 failure-building-service=Error building service {0}: {1}
 autowire-property-failure=Unable to autowire property {0} of class {1}: {2}
 unable-to-find-autowire-constructor=Unable to find constructor applicable for autowiring. Use explicit constructor parameters.
+unable-to-find-explicit-constructor=Unable to find constructor matching the parameters specified by the construct element.
 thread-cleanup-exception=Thread cleanup exception: {0}
 unknown-strategy=Unknown strategy {0}

Modified: hivemind/hivemind2/trunk/xml/src/java/org/apache/hivemind/service/impl/BuilderFactoryLogic.java
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/xml/src/java/org/apache/hivemind/service/impl/BuilderFactoryLogic.java?view=diff&rev=497982&r1=497981&r2=497982
==============================================================================
--- hivemind/hivemind2/trunk/xml/src/java/org/apache/hivemind/service/impl/BuilderFactoryLogic.java (original)
+++ hivemind/hivemind2/trunk/xml/src/java/org/apache/hivemind/service/impl/BuilderFactoryLogic.java Fri Jan 19 14:35:19 2007
@@ -29,7 +29,6 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.hivemind.ApplicationRuntimeException;
-import org.apache.hivemind.ErrorHandler;
 import org.apache.hivemind.HiveMind;
 import org.apache.hivemind.Location;
 import org.apache.hivemind.ServiceImplementationFactoryParameters;
@@ -121,7 +120,7 @@
             Constructor candidate = (Constructor) candidates.next();
 
             Class[] parameterTypes = candidate.getParameterTypes();
-
+            
             Object[] parameters = new Object[parameterTypes.length];
 
             for (int i = 0; i < numberOfParams; i++)
@@ -137,7 +136,7 @@
             return ConstructorUtils.invoke(candidate, parameters);
         }
 
-        throw new ApplicationRuntimeException(ServiceMessages.unableToFindAutowireConstructor(),
+        throw new ApplicationRuntimeException(ServiceMessages.unableToFindExplicitConstructor(),
                 _parameter.getLocation(), null);
     }
 
@@ -381,9 +380,5 @@
         autowiring.autowireProperties(AutowiringStrategy.BY_TYPE, service, props);
     }
 
-    private ErrorHandler getErrorHandler()
-    {
-        return _contributingModule.getErrorHandler();
-    }
 
 }