geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r780142 - 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 Fri, 29 May 2009 23:49:14 GMT
Author: gawor
Date: Fri May 29 23:49:14 2009
New Revision: 780142

URL: http://svn.apache.org/viewvc?rev=780142&view=rev
Log:
support registration listeners for managed service factories

Added:
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceListener.java
  (with props)
Modified:
    geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmManagedServiceFactory.java
    geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.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/reflect/BeanMetadataImpl.java

Modified: geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmManagedServiceFactory.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmManagedServiceFactory.java?rev=780142&r1=780141&r2=780142&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmManagedServiceFactory.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmManagedServiceFactory.java
Fri May 29 23:49:14 2009
@@ -32,6 +32,7 @@
 import org.apache.geronimo.blueprint.BeanProcessor;
 import org.apache.geronimo.blueprint.ExtendedBlueprintContainer;
 import org.apache.geronimo.blueprint.ServiceProcessor;
+import org.apache.geronimo.blueprint.container.ServiceListener;
 import org.apache.geronimo.blueprint.utils.JavaUtils;
 import org.apache.geronimo.blueprint.utils.ReflectionUtils;
 import org.osgi.framework.Bundle;
@@ -71,6 +72,7 @@
     private Map serviceProperties;
     private String managedComponentName;
     private String componentDestroyMethod;
+    private List<ServiceListener> listeners;
     private final Object lock = new Object();
 
     private ServiceRegistration registration;
@@ -103,13 +105,24 @@
             registration.unregister();
         }
         for (Map.Entry<ServiceRegistration, Object> entry : services.entrySet()) {
-            destroyComponent(entry.getValue(), BUNDLE_STOPPING);
-            entry.getKey().unregister();
+            destroy(entry.getValue(), entry.getKey(), BUNDLE_STOPPING);
         }
         services.clear();
         pids.clear();
     }
 
+    private void destroy(Object component, ServiceRegistration registration, int code) {
+        if (listeners != null) {
+            ServiceReference ref = registration.getReference();
+            for (ServiceListener listener : listeners) {
+                Hashtable props = JavaUtils.getProperties(ref);
+                listener.unregister(component, props);
+            }
+        }
+        destroyComponent(component, code);
+        registration.unregister();
+    }
+    
     public Map<ServiceRegistration, Object> getServiceMap() {
         return Collections.unmodifiableMap(services);
     }
@@ -122,6 +135,10 @@
         this.configAdmin = configAdmin;
     }
 
+    public void setListeners(List<ServiceListener> listeners) {
+        this.listeners = listeners;
+    }
+    
     public void setId(String id) {
         this.id = id;
     }
@@ -181,6 +198,12 @@
             
             services.put(reg, component);
             pids.put(pid, reg);
+            
+            if (listeners != null) {
+                for (ServiceListener listener : listeners) {
+                    listener.register(component, regProps);
+                }
+            }
         } else {
             updateComponentProperties(props);
             
@@ -260,10 +283,8 @@
         LOGGER.debug("Deleted configuration {}", pid);
         ServiceRegistration reg = pids.remove(pid);
         if (reg != null) {
-            // TODO: destroy instance, etc...
             Object component = services.remove(reg);
-            destroyComponent(component, CONFIGURATION_ADMIN_OBJECT_DELETED);
-            reg.unregister();
+            destroy(component, reg, CONFIGURATION_ADMIN_OBJECT_DELETED);
         }
     }
 
@@ -327,5 +348,5 @@
             }
         }
     }
-    
+   
 }

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=780142&r1=780141&r2=780142&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
Fri May 29 23:49:14 2009
@@ -19,19 +19,17 @@
 package org.apache.geronimo.blueprint.compendium.cm;
 
 import java.net.URL;
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
 import org.apache.geronimo.blueprint.ComponentDefinitionRegistry;
 import org.apache.geronimo.blueprint.NamespaceHandler;
 import org.apache.geronimo.blueprint.ParserContext;
-import org.apache.geronimo.blueprint.ext.PlaceholdersUtils;
 import org.apache.geronimo.blueprint.container.Parser;
 import org.apache.geronimo.blueprint.container.ParserContextImpl;
+import org.apache.geronimo.blueprint.container.ServiceListener;
+import org.apache.geronimo.blueprint.ext.PlaceholdersUtils;
 import org.apache.geronimo.blueprint.mutable.MutableBeanMetadata;
 import org.apache.geronimo.blueprint.mutable.MutableCollectionMetadata;
 import org.apache.geronimo.blueprint.mutable.MutableComponentMetadata;
@@ -40,7 +38,6 @@
 import org.apache.geronimo.blueprint.mutable.MutableRefMetadata;
 import org.apache.geronimo.blueprint.mutable.MutableReferenceMetadata;
 import org.apache.geronimo.blueprint.mutable.MutableValueMetadata;
-import org.apache.geronimo.blueprint.reflect.MetadataUtil;
 import org.osgi.service.blueprint.container.ComponentDefinitionException;
 import org.osgi.service.blueprint.reflect.BeanMetadata;
 import org.osgi.service.blueprint.reflect.BeanProperty;
@@ -51,11 +48,15 @@
 import org.osgi.service.blueprint.reflect.Metadata;
 import org.osgi.service.blueprint.reflect.RefMetadata;
 import org.osgi.service.blueprint.reflect.ReferenceMetadata;
+import org.osgi.service.blueprint.reflect.RegistrationListener;
 import org.osgi.service.blueprint.reflect.ServiceMetadata;
 import org.osgi.service.blueprint.reflect.ValueMetadata;
 import org.osgi.service.cm.ConfigurationAdmin;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
 
 /**
  * TODO
@@ -242,6 +243,7 @@
         Parser parser = getParser(context);
         
         // Parse elements
+        List<RegistrationListener> listeners = new ArrayList<RegistrationListener>();
         NodeList nl = element.getChildNodes();
         for (int i = 0; i < nl.getLength(); i++) {
             Node node = nl.item(i);
@@ -257,8 +259,8 @@
                     } else if (nodeNameEquals(e, Parser.SERVICE_PROPERTIES_ELEMENT)) { 
                         MapMetadata map = parser.parseServiceProperties(e, factoryMetadata);
                         factoryMetadata.addProperty("serviceProperties", map);
-                    } else {
-                        // TODO: parse listeners
+                    } else if (nodeNameEquals(e, Parser.REGISTRATION_LISTENER_ELEMENT)) {
+                        listeners.add(parser.parseRegistrationListener(e, factoryMetadata));
                     }
                 } else if (BLUEPRINT_CM_NAMESPACE.equals(e.getNamespaceURI())) {
                     if (nodeNameEquals(e, MANAGED_COMPONENT_ELEMENT)) {
@@ -279,6 +281,18 @@
             }
         }
 
+        MutableCollectionMetadata listenerCollection = context.createMetadata(MutableCollectionMetadata.class);
+        listenerCollection.setCollectionClass(List.class);
+        for (RegistrationListener listener : listeners) {
+            MutableBeanMetadata bean = context.createMetadata(MutableBeanMetadata.class);
+            bean.setRuntimeClass(ServiceListener.class);
+            bean.addProperty("listener", listener.getListenerComponent());
+            bean.addProperty("registerMethod", createValue(context, listener.getRegistrationMethodName()));
+            bean.addProperty("unregisterMethod", createValue(context, listener.getUnregistrationMethodName()));
+            listenerCollection.addValue(bean);
+        }
+        factoryMetadata.addProperty("listeners", listenerCollection);
+        
         context.getComponentDefinitionRegistry().registerComponentDefinition(factoryMetadata);
         
         MutableBeanMetadata mapMetadata = context.createMetadata(MutableBeanMetadata.class);

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java?rev=780142&r1=780141&r2=780142&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java
Fri May 29 23:49:14 2009
@@ -784,7 +784,7 @@
         return map;
     }
     
-    private RegistrationListener parseRegistrationListener(Element element, ComponentMetadata
enclosingComponent) {
+    public RegistrationListener parseRegistrationListener(Element element, ComponentMetadata
enclosingComponent) {
         RegistrationListenerImpl listener = new RegistrationListenerImpl();
         Metadata listenerComponent = null;
         // Parse attributes

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.java?rev=780142&r1=780141&r2=780142&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.java
Fri May 29 23:49:14 2009
@@ -229,9 +229,10 @@
     }
 
     private Recipe createRecipe(RegistrationListener listener) throws Exception {
-        BeanRecipe recipe = new BeanRecipe(getName(null), blueprintContainer, ServiceRecipe.Listener.class);
+        BeanRecipe recipe = new BeanRecipe(getName(null), blueprintContainer, ServiceListener.class);
         recipe.setProperty("listener", getValue(listener.getListenerComponent(), null));
-        recipe.setProperty("metadata", listener);
+        recipe.setProperty("registerMethod", listener.getRegistrationMethodName());
+        recipe.setProperty("unregisterMethod", listener.getUnregistrationMethodName());
         return recipe;
     }
 

Added: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceListener.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceListener.java?rev=780142&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceListener.java
(added)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceListener.java
Fri May 29 23:49:14 2009
@@ -0,0 +1,94 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.blueprint.container;
+
+import java.lang.reflect.Method;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.geronimo.blueprint.utils.ReflectionUtils;
+import org.osgi.service.blueprint.container.ComponentDefinitionException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ServiceListener {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(ServiceListener.class);
+    
+    private Object listener;
+    private String registerMethod;
+    private String unregisterMethod;
+
+    private List<Method> registerMethods;
+    private List<Method> unregisterMethods;
+    private boolean initialized = false;
+
+    public void setListener(Object listener) {
+        this.listener = listener;
+    }
+
+    public void setRegisterMethod(String method) {
+        this.registerMethod = method;
+    }
+    
+    public void setUnregisterMethod(String method) {
+        this.unregisterMethod = method;
+    }
+    
+    public void register(Object service, Map properties) {
+        init(service);
+        invokeMethod(registerMethods, service, properties);
+    }
+
+    public void unregister(Object service, Map properties) {
+        invokeMethod(unregisterMethods, service, properties);
+    }
+
+    private synchronized void init(Object service) {
+        if (initialized) {
+            return;
+        }
+        Class[] paramTypes = new Class[] { service.getClass(), Map.class };
+        Class listenerClass = listener.getClass();
+
+        registerMethods = ReflectionUtils.findCompatibleMethods(listenerClass, registerMethod,
paramTypes);
+        if (registerMethods.size() == 0) {
+            throw new ComponentDefinitionException("No matching methods found for listener
registration method: " + registerMethod);
+        }
+        unregisterMethods = ReflectionUtils.findCompatibleMethods(listenerClass, unregisterMethod,
paramTypes);
+        if (unregisterMethods.size() == 0) {
+            throw new ComponentDefinitionException("No matching methods found for listener
unregistration method: " + unregisterMethod);
+        }
+        initialized = true;
+    }
+
+    private void invokeMethod(List<Method> methods, Object service, Map properties)
{
+        if (methods == null || methods.isEmpty()) {
+            return;
+        }
+        Object[] args = new Object[] { service, properties };
+        for (Method method : methods) {
+            try {
+                method.invoke(listener, args);
+            } catch (Exception e) {
+                LOGGER.info("Error calling listener method " + method, e);
+            }
+        }
+    }
+
+}
+

Propchange: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceListener.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceListener.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

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=780142&r1=780141&r2=780142&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
Fri May 29 23:49:14 2009
@@ -1,6 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.geronimo.blueprint.container;
 
-import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Dictionary;
@@ -10,7 +25,6 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.geronimo.blueprint.BeanProcessor;
 import org.apache.geronimo.blueprint.BlueprintConstants;
 import org.apache.geronimo.blueprint.ExtendedBlueprintContainer;
 import org.apache.geronimo.blueprint.ServiceProcessor;
@@ -35,7 +49,6 @@
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
 import org.osgi.service.blueprint.reflect.RefMetadata;
-import org.osgi.service.blueprint.reflect.RegistrationListener;
 import org.osgi.service.blueprint.reflect.ServiceMetadata;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -60,7 +73,7 @@
     private Map properties;
     private ServiceRegistration registration;
     private Map registrationProperties;
-    private List<Listener> listeners;
+    private List<ServiceListener> listeners;
     private Object service;
     private boolean bundleScope;
 
@@ -164,8 +177,8 @@
             registration.unregister();
             if (listeners != null) {
                 LOGGER.debug("Calling listeners for service unregistration");
-                for (Listener listener : listeners) {
-                    listener.unregister(this);
+                for (ServiceListener listener : listeners) {
+                    listener.unregister(getService(), registrationProperties);
                 }
             }
             LOGGER.debug("Service {} unregistered", service);
@@ -180,26 +193,24 @@
     public Object getService(Bundle bundle, ServiceRegistration registration) {
         LOGGER.debug("Retrieving service for bundle {} and service registration {}", bundle,
registration);
         // Create initial service
-        if (this.service == null) {
-            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 (Listener listener : listeners) {
-                            listener.register(this);
-                        }
+        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);
                     }
                 }
             }
@@ -360,68 +371,5 @@
             setProperties(table);
         }        
     }
-    
-    public static class Listener {
-
-        private Object listener;
-        private RegistrationListener metadata;
-
-        private List<Method> registerMethods;
-        private List<Method> unregisterMethods;
-        private boolean initialized = false;
-
-        public void setListener(Object listener) {
-            this.listener = listener;
-        }
-
-        public void setMetadata(RegistrationListener metadata) {
-            this.metadata = metadata;
-        }
-
-        public void register(ServiceRecipe recipe) {
-            init(recipe);
-            invokeMethod(registerMethods, recipe);
-        }
-
-        public void unregister(ServiceRecipe recipe) {
-            invokeMethod(unregisterMethods, recipe);
-        }
-
-        private synchronized void init(ServiceRecipe recipe) {
-            if (initialized) {
-                return;
-            }
-            Object service = recipe.getService();
-            Class[] paramTypes = new Class[] { service.getClass(), Map.class };
-            Class listenerClass = listener.getClass();
-
-            registerMethods = ReflectionUtils.findCompatibleMethods(listenerClass, metadata.getRegistrationMethodName(),
paramTypes);
-            if (registerMethods.size() == 0) {
-                throw new ComponentDefinitionException("No matching methods found for listener
registration method: " + metadata.getRegistrationMethodName());
-            }
-            unregisterMethods = ReflectionUtils.findCompatibleMethods(listenerClass, metadata.getUnregistrationMethodName(),
paramTypes);
-            if (unregisterMethods.size() == 0) {
-                throw new ComponentDefinitionException("No matching methods found for listener
unregistration method: " + metadata.getUnregistrationMethodName());
-            }
-            initialized = true;
-        }
-
-        private void invokeMethod(List<Method> methods, ServiceRecipe recipe) {
-            if (methods == null || methods.isEmpty()) {
-                return;
-            }
-            Object service = recipe.getService();
-            Map properties = recipe.registrationProperties;
-            Object[] args = new Object[] { service, properties };
-            for (Method method : methods) {
-                try {
-                    method.invoke(listener, args);
-                } catch (Exception e) {
-                    LOGGER.info("Error calling listener method " + method, e);
-                }
-            }
-        }
-
-    }
 
 }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanMetadataImpl.java?rev=780142&r1=780141&r2=780142&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanMetadataImpl.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanMetadataImpl.java
Fri May 29 23:49:14 2009
@@ -51,6 +51,8 @@
     private boolean processor;
 
     public BeanMetadataImpl() {
+        initialization = INITIALIZATION_EAGER;
+        scope = SCOPE_SINGLETON;
     }
 
     public BeanMetadataImpl(BeanMetadata source) {



Mime
View raw message