geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r780892 - in /geronimo/sandbox/blueprint: blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/ blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ blueprint-core/src/main/java/org/apache/geronimo/bluepri...
Date Tue, 02 Jun 2009 00:04:15 GMT
Author: gnodet
Date: Tue Jun  2 00:04:15 2009
New Revision: 780892

URL: http://svn.apache.org/viewvc?rev=780892&view=rev
Log:
Various minor fixes

Modified:
    geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java
    geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmPropertyPlaceholder.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceRecipe.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/AbstractRecipe.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/ExtNamespaceHandler.java

Modified: geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java?rev=780892&r1=780891&r2=780892&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java
Tue Jun  2 00:04:15 2009
@@ -59,7 +59,14 @@
 import org.w3c.dom.NodeList;
 
 /**
- * TODO
+ * Namespace handler for the Config Admin service.
+ * This handler will parse the various elements defined and populate / modify the registry
+ * accordingly.
+ *
+ * @see CmManagedProperties
+ * @see CmManagedServiceFactory
+ * @see CmProperties
+ * @see CmPropertyPlaceholder
  *
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $

Modified: geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmPropertyPlaceholder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmPropertyPlaceholder.java?rev=780892&r1=780891&r2=780892&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmPropertyPlaceholder.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmPropertyPlaceholder.java
Tue Jun  2 00:04:15 2009
@@ -33,6 +33,9 @@
 /**
  * TODO: javadoc
  *
+ * TODO: make CmPropertyPlaceholder extends PropertyPlaceholder and add some custom attributes
/ elements to
+ *   define those in the schema
+ *
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
  */

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.java?rev=780892&r1=780891&r2=780892&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.java
Tue Jun  2 00:04:15 2009
@@ -354,7 +354,7 @@
                     unbindMethodsTwoArgs.addAll(ReflectionUtils.findCompatibleMethods(listenerClass,
unbindName, new Class[] { clazz, Map.class }));
                 }
                 if (unbindMethodsOneArg.size() + unbindMethodsTwoArgs.size() == 0) {
-                    throw new ComponentDefinitionException("No matching methods found for
listener bind method: " + bindName);
+                    throw new ComponentDefinitionException("No matching methods found for
listener unbind method: " + unbindName);
                 }
             }
         }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceRecipe.java?rev=780892&r1=780891&r2=780892&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceRecipe.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceRecipe.java
Tue Jun  2 00:04:15 2009
@@ -195,23 +195,28 @@
         // Create initial service
         synchronized (this) {
             if (this.service == null) {
-                bundleScope = isBundleScope(metadata.getServiceComponent());
-                LOGGER.debug("Creating service instance (bundle scope = {})", bundleScope);
-                this.service = createInstance(false);
-                LOGGER.debug("Service created: {}", this.service);
-                // When the service is first requested, we need to create listeners and call
them
-                if (listeners == null) {
-                    LOGGER.debug("Creating listeners");
-                    if (listenersRecipe != null) {
-                        listeners = (List) createSimpleRecipe(listenersRecipe);
-                    } else {
-                        listeners = Collections.emptyList();
-                    }
-                    LOGGER.debug("Listeners created: {}", listeners);
-                    LOGGER.debug("Calling listeners for service registration");
-                    for (ServiceListener listener : listeners) {
-                        listener.register(service, registrationProperties);
+                try {
+                    bundleScope = isBundleScope(metadata.getServiceComponent());
+                    LOGGER.debug("Creating service instance (bundle scope = {})", bundleScope);
+                    this.service = createInstance(false);
+                    LOGGER.debug("Service created: {}", this.service);
+                    // When the service is first requested, we need to create listeners and
call them
+                    if (listeners == null) {
+                        LOGGER.debug("Creating listeners");
+                        if (listenersRecipe != null) {
+                            listeners = (List) createSimpleRecipe(listenersRecipe);
+                        } else {
+                            listeners = Collections.emptyList();
+                        }
+                        LOGGER.debug("Listeners created: {}", listeners);
+                        LOGGER.debug("Calling listeners for service registration");
+                        for (ServiceListener listener : listeners) {
+                            listener.register(service, registrationProperties);
+                        }
                     }
+                } catch (RuntimeException e) {
+                    LOGGER.error("Error retrieving service from " + this, e);
+                    throw e;
                 }
             }
         }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/AbstractRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/AbstractRecipe.java?rev=780892&r1=780891&r2=780892&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/AbstractRecipe.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/AbstractRecipe.java
Tue Jun  2 00:04:15 2009
@@ -95,7 +95,7 @@
         try {
             return ExecutionContext.getContext().loadClass(className);
         } catch (ClassNotFoundException e) {
-            throw new ComponentDefinitionException(e);
+            throw new ComponentDefinitionException("Unable to load class " + className +
" from recipe " + this, e);
         }
     }
 

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/ExtNamespaceHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/ExtNamespaceHandler.java?rev=780892&r1=780891&r2=780892&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/ExtNamespaceHandler.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ext/ExtNamespaceHandler.java
Tue Jun  2 00:04:15 2009
@@ -146,6 +146,7 @@
         metadata.setId(getId(context, element));
         metadata.setScope(BeanMetadata.SCOPE_SINGLETON);
         metadata.setRuntimeClass(PropertyPlaceholder.class);
+        metadata.setInitMethodName("init");
         String prefix = element.hasAttribute(PLACEHOLDER_PREFIX_ATTRIBUTE)
                                     ? element.getAttribute(PLACEHOLDER_PREFIX_ATTRIBUTE)
                                     : "${";



Mime
View raw message