You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by gn...@apache.org on 2009/05/19 17:40:48 UTC
svn commit: r776360 [1/2] - in /geronimo/sandbox/blueprint:
blueprint-api/src/main/java/org/osgi/service/blueprint/container/
blueprint-api/src/main/java/org/osgi/service/blueprint/context/
blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compe...
Author: gnodet
Date: Tue May 19 15:40:47 2009
New Revision: 776360
URL: http://svn.apache.org/viewvc?rev=776360&view=rev
Log:
Rename BlueprintContext to BlueprintContainer
Added:
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/
- copied from r776245, geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/context/
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainer.java (with props)
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainerListener.java (with props)
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedBlueprintContainer.java
- copied, changed from r776247, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedBlueprintContext.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/
- copied from r776245, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.java
- copied, changed from r776247, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/AbstractServiceReferenceRecipe.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintContainerImpl.java
- copied, changed from r776329, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BlueprintContextImpl.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintObjectInstantiator.java
- copied, changed from r776247, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BlueprintObjectInstantiator.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintObjectRecipe.java
- copied, changed from r776331, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BlueprintObjectRecipe.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BundleScopeServiceFactory.java
- copied, changed from r776247, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BundleScopeServiceFactory.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/CollectionBasedServiceReferenceRecipe.java
- copied, changed from r776351, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/CollectionBasedServiceReferenceRecipe.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/DefaultBlueprintContextEventSender.java
- copied, changed from r776328, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/DefaultBlueprintContextEventSender.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java
- copied, changed from r776247, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.java
- copied, changed from r776247, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/RecipeBuilder.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/SatisfiableRecipe.java
- copied, changed from r776247, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/SatisfiableRecipe.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceRegistrationProxy.java
- copied, changed from r776247, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/ServiceRegistrationProxy.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/TriggerService.java
- copied, changed from r776247, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/TriggerService.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/UnaryServiceReferenceRecipe.java
- copied, changed from r776247, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/UnaryServiceReferenceRecipe.java
Removed:
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContext.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContextListener.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/context/
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedBlueprintContext.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintContextImpl.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/
Modified:
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ComponentDefinitionException.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/EventConstants.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/NoSuchComponentException.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ServiceUnavailableException.java
geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmManagedProperties.java
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/BlueprintConstants.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/BlueprintExtender.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/beans/AbstractPropertyPlaceholder.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceReferenceTracker.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceUnregisteredException.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/convert/ConversionServiceImpl.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/di/ArrayRecipe.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/CollectionRecipe.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/ConstructionException.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/ExecutionContext.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/MapRecipe.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/ObjectGraph.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/ReferenceRecipe.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/namespace/ParserContextImpl.java
geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/AbstractBlueprintTest.java
geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/ParserTest.java
geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/TestBlueprintContext.java
geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/WiringTest.java
geronimo/sandbox/blueprint/blueprint-itests/src/test/java/org/apache/geronimo/blueprint/itests/AbstractIntegrationTest.java
geronimo/sandbox/blueprint/blueprint-itests/src/test/java/org/apache/geronimo/blueprint/itests/TestBlueprintContext.java
geronimo/sandbox/blueprint/blueprint-itests/src/test/java/org/apache/geronimo/blueprint/itests/TestConfigAdmin.java
geronimo/sandbox/blueprint/blueprint-itests/src/test/java/org/apache/geronimo/blueprint/itests/TestReferences.java
Added: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainer.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainer.java?rev=776360&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainer.java (added)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainer.java Tue May 19 15:40:47 2009
@@ -0,0 +1,48 @@
+/**
+ * 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.osgi.service.blueprint.container;
+
+import java.util.Collection;
+import java.util.Set;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.ServiceReferenceMetadata;
+import org.osgi.service.blueprint.reflect.ServiceMetadata;
+import org.osgi.service.blueprint.reflect.BeanMetadata;
+
+public interface BlueprintContainer {
+
+ static final int CONFIGURATION_ADMIN_OBJECT_DELTED = 1;
+
+ static final int BUNDLE_STOPPING = 2;
+
+ Set<String> getComponentNames();
+
+ Object getComponent(String name) throws NoSuchComponentException;
+
+ ComponentMetadata getComponentMetadata(String name) throws NoSuchComponentException;
+
+ Collection<ServiceReferenceMetadata> getReferencedServicesMetadata();
+
+ Collection<ServiceMetadata> getExportedServicesMetadata();
+
+ Collection<BeanMetadata> getBeanComponentsMetadata();
+
+ BundleContext getBundleContext();
+
+}
Propchange: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainer.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainer.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainerListener.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainerListener.java?rev=776360&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainerListener.java (added)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainerListener.java Tue May 19 15:40:47 2009
@@ -0,0 +1,27 @@
+/**
+ * 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.osgi.service.blueprint.container;
+
+import org.osgi.framework.Bundle;
+
+public interface BlueprintContainerListener {
+
+ void contextCreated(Bundle forBundle);
+
+ void contextCreationFailed(Bundle forBundle, Throwable rootCause);
+
+}
Propchange: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainerListener.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainerListener.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainerListener.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ComponentDefinitionException.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ComponentDefinitionException.java?rev=776360&r1=776245&r2=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ComponentDefinitionException.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ComponentDefinitionException.java Tue May 19 15:40:47 2009
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.osgi.service.blueprint.context;
+package org.osgi.service.blueprint.container;
public class ComponentDefinitionException extends RuntimeException {
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/EventConstants.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/EventConstants.java?rev=776360&r1=776245&r2=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/EventConstants.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/EventConstants.java Tue May 19 15:40:47 2009
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.osgi.service.blueprint.context;
+package org.osgi.service.blueprint.container;
public interface EventConstants {
@@ -26,16 +26,16 @@
static final String TOPIC_BLUEPRINT_EVENTS = "org/osgi/service/blueprint";
- static final String TOPIC_CREATED = TOPIC_BLUEPRINT_EVENTS + "/context/CREATED";
+ static final String TOPIC_CREATED = TOPIC_BLUEPRINT_EVENTS + "/container/CREATED";
- static final String TOPIC_CREATING = TOPIC_BLUEPRINT_EVENTS + "/context/CREATING";
+ static final String TOPIC_CREATING = TOPIC_BLUEPRINT_EVENTS + "/container/CREATING";
- static final String TOPIC_DESTROYED = TOPIC_BLUEPRINT_EVENTS + "/context/DESTROYED";
+ static final String TOPIC_DESTROYED = TOPIC_BLUEPRINT_EVENTS + "/container/DESTROYED";
- static final String TOPIC_DESTROYING = TOPIC_BLUEPRINT_EVENTS + "/context/DESTROYING";
+ static final String TOPIC_DESTROYING = TOPIC_BLUEPRINT_EVENTS + "/container/DESTROYING";
- static final String TOPIC_FAILURE = TOPIC_BLUEPRINT_EVENTS + "/context/FAILURE";
+ static final String TOPIC_FAILURE = TOPIC_BLUEPRINT_EVENTS + "/container/FAILURE";
- static final String TOPIC_WAITING = TOPIC_BLUEPRINT_EVENTS + "/context/WAITING";
+ static final String TOPIC_WAITING = TOPIC_BLUEPRINT_EVENTS + "/container/WAITING";
}
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/NoSuchComponentException.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/NoSuchComponentException.java?rev=776360&r1=776245&r2=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/NoSuchComponentException.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/NoSuchComponentException.java Tue May 19 15:40:47 2009
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.osgi.service.blueprint.context;
+package org.osgi.service.blueprint.container;
public class NoSuchComponentException extends RuntimeException {
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ServiceUnavailableException.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ServiceUnavailableException.java?rev=776360&r1=776245&r2=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ServiceUnavailableException.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ServiceUnavailableException.java Tue May 19 15:40:47 2009
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.osgi.service.blueprint.context;
+package org.osgi.service.blueprint.container;
public class ServiceUnavailableException extends RuntimeException {
Modified: geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmManagedProperties.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmManagedProperties.java?rev=776360&r1=776359&r2=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmManagedProperties.java (original)
+++ geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmManagedProperties.java Tue May 19 15:40:47 2009
@@ -33,7 +33,7 @@
import java.util.Set;
import org.apache.geronimo.blueprint.BeanProcessor;
-import org.apache.geronimo.blueprint.ExtendedBlueprintContext;
+import org.apache.geronimo.blueprint.ExtendedBlueprintContainer;
import org.apache.geronimo.blueprint.utils.ReflectionUtils;
import org.apache.geronimo.blueprint.di.MissingAccessorException;
import org.osgi.framework.Bundle;
@@ -55,7 +55,7 @@
private static final Logger LOGGER = LoggerFactory.getLogger(CmManagedProperties.class);
- private ExtendedBlueprintContext blueprintContext;
+ private ExtendedBlueprintContainer blueprintContainer;
private ConfigurationAdmin configAdmin;
private String persistentId;
private String updateStrategy;
@@ -67,12 +67,12 @@
private ServiceRegistration registration;
private Dictionary<String,Object> properties;
- public ExtendedBlueprintContext getBlueprintContext() {
- return blueprintContext;
+ public ExtendedBlueprintContainer getBlueprintContainer() {
+ return blueprintContainer;
}
- public void setBlueprintContext(ExtendedBlueprintContext blueprintContext) {
- this.blueprintContext = blueprintContext;
+ public void setBlueprintContainer(ExtendedBlueprintContainer blueprintContainer) {
+ this.blueprintContainer = blueprintContainer;
}
public ConfigurationAdmin getConfigAdmin() {
@@ -119,11 +119,11 @@
LOGGER.debug("Initializing CmManagedProperties for bean={} / pid={}", beanName, persistentId);
Properties props = new Properties();
props.put(Constants.SERVICE_PID, persistentId);
- Bundle bundle = blueprintContext.getBundleContext().getBundle();
+ Bundle bundle = blueprintContainer.getBundleContext().getBundle();
props.put(Constants.BUNDLE_SYMBOLICNAME, bundle.getSymbolicName());
props.put(Constants.BUNDLE_VERSION, bundle.getHeaders().get(Constants.BUNDLE_VERSION));
synchronized (lock) {
- registration = blueprintContext.getBundleContext().registerService(ManagedService.class.getName(), new ConfigurationWatcher(), props);
+ registration = blueprintContainer.getBundleContext().registerService(ManagedService.class.getName(), new ConfigurationWatcher(), props);
try {
properties = configAdmin.getConfiguration(persistentId).getProperties();
} catch (Throwable t) {
@@ -220,7 +220,7 @@
Class methodParameterType = method.getParameterTypes()[0];
Object propertyValue;
try {
- propertyValue = blueprintContext.getConversionService().convert(val, methodParameterType);
+ propertyValue = blueprintContainer.getConversionService().convert(val, methodParameterType);
} catch (Throwable t) {
LOGGER.debug("Unable to convert value for setter: " + method, t);
continue;
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=776360&r1=776359&r2=776360&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 May 19 15:40:47 2009
@@ -32,7 +32,7 @@
import org.apache.geronimo.blueprint.mutable.MutableRefMetadata;
import org.apache.geronimo.blueprint.mutable.MutableReferenceMetadata;
import org.apache.geronimo.blueprint.mutable.MutableIdRefMetadata;
-import org.osgi.service.blueprint.context.ComponentDefinitionException;
+import org.osgi.service.blueprint.container.ComponentDefinitionException;
import org.osgi.service.blueprint.namespace.ComponentDefinitionRegistry;
import org.osgi.service.blueprint.namespace.NamespaceHandler;
import org.osgi.service.blueprint.namespace.ParserContext;
@@ -114,7 +114,7 @@
MutableBeanMetadata metadata = context.createMetadata(MutableBeanMetadata.class);
metadata.setId(getName(element));
metadata.setRuntimeClass(CmPropertyPlaceholder.class);
- metadata.addProperty("blueprintContext", createRef(context, "blueprintContext"));
+ metadata.addProperty("blueprintContainer", createRef(context, "blueprintContainer"));
metadata.addProperty("configAdmin", createRef(context, CONFIG_ADMIN_REFERENCE_NAME));
metadata.addProperty("persistentId", createValue(context, element.getAttribute(PERSISTENT_ID_ATTRIBUTE)));
String prefix = element.hasAttribute(PLACEHOLDER_PREFIX_ATTRIBUTE)
@@ -192,7 +192,7 @@
metadata.setRuntimeClass(CmManagedProperties.class);
metadata.setInitMethodName("init");
metadata.setDestroyMethodName("destroy");
- metadata.addProperty("blueprintContext", createRef(context, "blueprintContext"));
+ metadata.addProperty("blueprintContainer", createRef(context, "blueprintContainer"));
metadata.addProperty("configAdmin", createRef(context, CONFIG_ADMIN_REFERENCE_NAME));
metadata.addProperty("persistentId", createValue(context, element.getAttribute(PERSISTENT_ID_ATTRIBUTE)));
if (element.hasAttribute(UPDATE_STRATEGY_ATTRIBUTE)) {
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=776360&r1=776359&r2=776360&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 May 19 15:40:47 2009
@@ -19,31 +19,13 @@
package org.apache.geronimo.blueprint.compendium.cm;
import java.util.Map;
-import java.util.List;
import java.util.Dictionary;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import org.osgi.service.blueprint.context.BlueprintContext;
-import org.osgi.service.blueprint.context.ComponentDefinitionException;
-import org.osgi.service.blueprint.namespace.ComponentDefinitionRegistry;
-import org.osgi.service.blueprint.reflect.BeanMetadata;
-import org.osgi.service.blueprint.reflect.RefCollectionMetadata;
-import org.osgi.service.blueprint.reflect.ReferenceMetadata;
-import org.osgi.service.blueprint.reflect.ServiceMetadata;
-import org.osgi.service.blueprint.reflect.BeanArgument;
+import org.osgi.service.blueprint.container.BlueprintContainer;
import org.osgi.service.blueprint.reflect.ValueMetadata;
-import org.osgi.service.blueprint.reflect.BeanProperty;
import org.osgi.service.blueprint.reflect.Metadata;
-import org.osgi.service.blueprint.reflect.MapEntry;
-import org.osgi.service.blueprint.reflect.RegistrationListener;
-import org.osgi.service.blueprint.reflect.CollectionMetadata;
-import org.osgi.service.blueprint.reflect.MapMetadata;
-import org.osgi.service.blueprint.reflect.PropsMetadata;
-import org.osgi.service.blueprint.reflect.Listener;
import org.osgi.service.cm.ConfigurationAdmin;
import org.osgi.service.cm.Configuration;
-import org.apache.geronimo.blueprint.ComponentDefinitionRegistryProcessor;
import org.apache.geronimo.blueprint.beans.AbstractPropertyPlaceholder;
import org.apache.geronimo.blueprint.mutable.MutableValueMetadata;
import org.slf4j.LoggerFactory;
@@ -59,17 +41,17 @@
private static final Logger LOGGER = LoggerFactory.getLogger(CmPropertyPlaceholder.class);
- private BlueprintContext blueprintContext;
+ private BlueprintContainer blueprintContainer;
private ConfigurationAdmin configAdmin;
private String persistentId;
private Map defaultProperties;
- public BlueprintContext getBlueprintContext() {
- return blueprintContext;
+ public BlueprintContainer getBlueprintContainer() {
+ return blueprintContainer;
}
- public void setBlueprintContext(BlueprintContext blueprintContext) {
- this.blueprintContext = blueprintContext;
+ public void setBlueprintContainer(BlueprintContainer blueprintContainer) {
+ this.blueprintContainer = blueprintContainer;
}
public ConfigurationAdmin getConfigAdmin() {
Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/BlueprintConstants.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/BlueprintConstants.java?rev=776360&r1=776359&r2=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/BlueprintConstants.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/BlueprintConstants.java Tue May 19 15:40:47 2009
@@ -32,8 +32,8 @@
public static final String COMPONENT_NAME_PROPERTY = "osgi.service.blueprint.compname";
- public static final String CONTEXT_SYMBOLIC_NAME_PROPERTY = "osgi.blueprint.context.symbolicname";
+ public static final String CONTEXT_SYMBOLIC_NAME_PROPERTY = "osgi.blueprint.container.symbolicname";
- public static final String CONTEXT_VERSION_PROPERTY = "osgi.blueprint.context.version";
+ public static final String CONTEXT_VERSION_PROPERTY = "osgi.blueprint.container.version";
}
Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/BlueprintExtender.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/BlueprintExtender.java?rev=776360&r1=776359&r2=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/BlueprintExtender.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/BlueprintExtender.java Tue May 19 15:40:47 2009
@@ -29,8 +29,8 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
-import org.apache.geronimo.blueprint.context.BlueprintContextImpl;
-import org.apache.geronimo.blueprint.context.DefaultBlueprintContextEventSender;
+import org.apache.geronimo.blueprint.container.BlueprintContainerImpl;
+import org.apache.geronimo.blueprint.container.DefaultBlueprintContextEventSender;
import org.apache.geronimo.blueprint.namespace.NamespaceHandlerRegistryImpl;
import org.apache.geronimo.blueprint.utils.HeaderParser;
import org.apache.geronimo.blueprint.utils.HeaderParser.PathElement;
@@ -39,7 +39,7 @@
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleEvent;
import org.osgi.framework.SynchronousBundleListener;
-import org.osgi.service.blueprint.context.BlueprintContext;
+import org.osgi.service.blueprint.container.BlueprintContainer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -55,7 +55,7 @@
private ExecutorService executors;
private Timer timer;
- private Map<Bundle, BlueprintContextImpl> contextMap;
+ private Map<Bundle, BlueprintContainerImpl> contextMap;
private BlueprintContextEventSender sender;
private NamespaceHandlerRegistry handlers;
@@ -66,7 +66,7 @@
handlers = new NamespaceHandlerRegistryImpl(context);
executors = Executors.newCachedThreadPool();
timer = new Timer("BlueprintExtender-Timer", true);
- contextMap = new HashMap<Bundle, BlueprintContextImpl>();
+ contextMap = new HashMap<Bundle, BlueprintContainerImpl>();
context.addBundleListener(this);
@@ -82,9 +82,9 @@
public void stop(BundleContext context) {
LOGGER.debug("Stopping blueprint extender...");
- // TODO: we should order the blueprint context destruction wrt service exports / dependencies
+ // TODO: we should order the blueprint container destruction wrt service exports / dependencies
// TODO: also if a blueprint bundle is being stopped at the same time (this could happen if the framework
- // is shut down, we should not wait for the blueprint context to be destroyed if it is already being
+ // is shut down, we should not wait for the blueprint container to be destroyed if it is already being
// destroyed by the extender
List<Bundle> bundles = new ArrayList<Bundle>(contextMap.keySet());
for (Bundle bundle : bundles) {
@@ -103,11 +103,11 @@
if (event.getType() == BundleEvent.LAZY_ACTIVATION) {
checkBundle(bundle, true);
} else if (event.getType() == BundleEvent.STARTED) {
- BlueprintContextImpl blueprintContext = contextMap.get(bundle);
- if (blueprintContext == null) {
+ BlueprintContainerImpl blueprintContainer = contextMap.get(bundle);
+ if (blueprintContainer == null) {
checkBundle(bundle, false);
} else {
- blueprintContext.triggerActivation();
+ blueprintContainer.triggerActivation();
}
} else if (event.getType() == BundleEvent.STOPPING) {
destroyContext(bundle);
@@ -115,10 +115,10 @@
}
private void destroyContext(Bundle bundle) {
- BlueprintContextImpl blueprintContext = contextMap.remove(bundle);
- if (blueprintContext != null) {
- LOGGER.debug("Destroying BlueprintContext for bundle {}", bundle.getSymbolicName());
- blueprintContext.destroy();
+ BlueprintContainerImpl blueprintContainer = contextMap.remove(bundle);
+ if (blueprintContainer != null) {
+ LOGGER.debug("Destroying BlueprintContainer for bundle {}", bundle.getSymbolicName());
+ blueprintContainer.destroy();
}
}
@@ -156,10 +156,10 @@
// the bundle to be fully started
boolean compatible = lazyActivation || isCompatible(bundle);
if (compatible) {
- final BlueprintContextImpl blueprintContext = new BlueprintContextImpl(bundle.getBundleContext(), sender, handlers, executors, timer, urls, lazyActivation);
- contextMap.put(bundle, blueprintContext);
+ final BlueprintContainerImpl blueprintContainer = new BlueprintContainerImpl(bundle.getBundleContext(), sender, handlers, executors, timer, urls, lazyActivation);
+ contextMap.put(bundle, blueprintContainer);
// run synchronous when bundle is lazy activated
- blueprintContext.run(lazyActivation ? false: true);
+ blueprintContainer.run(lazyActivation ? false: true);
} else {
LOGGER.info("Bundle {} is not compatible with this blueprint extender", bundle.getSymbolicName());
}
@@ -176,8 +176,8 @@
// Check compatibility
boolean compatible;
try {
- Class clazz = bundle.getBundleContext().getBundle().loadClass(BlueprintContext.class.getName());
- compatible = (clazz == BlueprintContext.class);
+ Class clazz = bundle.getBundleContext().getBundle().loadClass(BlueprintContainer.class.getName());
+ compatible = (clazz == BlueprintContainer.class);
} catch (ClassNotFoundException e) {
compatible = true;
}
Copied: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedBlueprintContainer.java (from r776247, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedBlueprintContext.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedBlueprintContainer.java?p2=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedBlueprintContainer.java&p1=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedBlueprintContext.java&r1=776247&r2=776360&rev=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedBlueprintContext.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedBlueprintContainer.java Tue May 19 15:40:47 2009
@@ -18,7 +18,7 @@
import java.util.List;
-import org.osgi.service.blueprint.context.BlueprintContext;
+import org.osgi.service.blueprint.container.BlueprintContainer;
import org.osgi.service.blueprint.convert.ConversionService;
import org.osgi.service.blueprint.reflect.ComponentMetadata;
@@ -28,7 +28,7 @@
* @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) $
*/
-public interface ExtendedBlueprintContext extends BlueprintContext {
+public interface ExtendedBlueprintContainer extends BlueprintContainer {
ConversionService getConversionService();
Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/beans/AbstractPropertyPlaceholder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/beans/AbstractPropertyPlaceholder.java?rev=776360&r1=776359&r2=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/beans/AbstractPropertyPlaceholder.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/beans/AbstractPropertyPlaceholder.java Tue May 19 15:40:47 2009
@@ -36,7 +36,7 @@
import org.apache.geronimo.blueprint.mutable.MutableRegistrationListener;
import org.apache.geronimo.blueprint.mutable.MutableServiceMetadata;
import org.apache.geronimo.blueprint.mutable.MutableValueMetadata;
-import org.osgi.service.blueprint.context.ComponentDefinitionException;
+import org.osgi.service.blueprint.container.ComponentDefinitionException;
import org.osgi.service.blueprint.namespace.ComponentDefinitionRegistry;
import org.osgi.service.blueprint.reflect.BeanArgument;
import org.osgi.service.blueprint.reflect.BeanMetadata;
Copied: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.java (from r776247, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/AbstractServiceReferenceRecipe.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.java?p2=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.java&p1=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/AbstractServiceReferenceRecipe.java&r1=776247&r2=776360&rev=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/AbstractServiceReferenceRecipe.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AbstractServiceReferenceRecipe.java Tue May 19 15:40:47 2009
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.geronimo.blueprint.context;
+package org.apache.geronimo.blueprint.container;
import java.lang.reflect.Method;
import java.util.ArrayList;
@@ -32,8 +32,8 @@
import net.sf.cglib.proxy.Enhancer;
import org.apache.geronimo.blueprint.BlueprintConstants;
import org.apache.geronimo.blueprint.BlueprintContextEventSender;
-import org.apache.geronimo.blueprint.ExtendedBlueprintContext;
-import org.apache.geronimo.blueprint.context.SatisfiableRecipe;
+import org.apache.geronimo.blueprint.ExtendedBlueprintContainer;
+import org.apache.geronimo.blueprint.container.SatisfiableRecipe;
import org.apache.geronimo.blueprint.di.AbstractRecipe;
import org.apache.geronimo.blueprint.di.ConstructionException;
import org.apache.geronimo.blueprint.di.Recipe;
@@ -56,7 +56,7 @@
*/
public abstract class AbstractServiceReferenceRecipe extends AbstractRecipe implements ServiceListener, SatisfiableRecipe {
- protected final ExtendedBlueprintContext blueprintContext;
+ protected final ExtendedBlueprintContainer blueprintContainer;
protected final BlueprintContextEventSender sender;
protected final ServiceReferenceMetadata metadata;
protected final Recipe listenersRecipe;
@@ -66,21 +66,21 @@
protected ServiceReferenceTracker tracker;
protected boolean optional;
- protected AbstractServiceReferenceRecipe(ExtendedBlueprintContext blueprintContext,
+ protected AbstractServiceReferenceRecipe(ExtendedBlueprintContainer blueprintContainer,
BlueprintContextEventSender sender,
ServiceReferenceMetadata metadata,
Recipe listenersRecipe) {
- this.blueprintContext = blueprintContext;
+ this.blueprintContainer = blueprintContainer;
this.sender = sender;
this.metadata = metadata;
this.listenersRecipe = listenersRecipe;
// Create a ClassLoader delegating to the bundle, but also being able to see our bundle classes
// so that the created proxy can access cglib classes.
- this.proxyClassLoader = new BundleDelegatingClassLoader(blueprintContext.getBundleContext().getBundle(),
+ this.proxyClassLoader = new BundleDelegatingClassLoader(blueprintContainer.getBundleContext().getBundle(),
getClass().getClassLoader());
this.optional = (metadata.getAvailability() == ReferenceMetadata.AVAILABILITY_OPTIONAL);
- this.tracker = new ServiceReferenceTracker(blueprintContext.getBundleContext(), getOsgiFilter(), optional);
+ this.tracker = new ServiceReferenceTracker(blueprintContainer.getBundleContext(), getOsgiFilter(), optional);
}
public void start() {
Copied: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintContainerImpl.java (from r776329, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BlueprintContextImpl.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintContainerImpl.java?p2=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintContainerImpl.java&p1=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BlueprintContextImpl.java&r1=776329&r2=776360&rev=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BlueprintContextImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintContainerImpl.java Tue May 19 15:40:47 2009
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.geronimo.blueprint.context;
+package org.apache.geronimo.blueprint.container;
import java.net.URI;
import java.net.URL;
@@ -40,9 +40,9 @@
import org.apache.geronimo.blueprint.BlueprintContextEventSender;
import org.apache.geronimo.blueprint.ComponentDefinitionRegistryProcessor;
import org.apache.geronimo.blueprint.Destroyable;
-import org.apache.geronimo.blueprint.ExtendedBlueprintContext;
+import org.apache.geronimo.blueprint.ExtendedBlueprintContainer;
import org.apache.geronimo.blueprint.NamespaceHandlerRegistry;
-import org.apache.geronimo.blueprint.context.SatisfiableRecipe;
+import org.apache.geronimo.blueprint.container.SatisfiableRecipe;
import org.apache.geronimo.blueprint.convert.ConversionServiceImpl;
import org.apache.geronimo.blueprint.di.DefaultExecutionContext;
import org.apache.geronimo.blueprint.di.DefaultRepository;
@@ -60,10 +60,9 @@
import org.osgi.framework.BundleException;
import org.osgi.framework.Constants;
import org.osgi.framework.ServiceRegistration;
-import org.osgi.framework.ServiceFactory;
-import org.osgi.service.blueprint.context.BlueprintContext;
-import org.osgi.service.blueprint.context.ComponentDefinitionException;
-import org.osgi.service.blueprint.context.NoSuchComponentException;
+import org.osgi.service.blueprint.container.BlueprintContainer;
+import org.osgi.service.blueprint.container.ComponentDefinitionException;
+import org.osgi.service.blueprint.container.NoSuchComponentException;
import org.osgi.service.blueprint.convert.ConversionService;
import org.osgi.service.blueprint.convert.Converter;
import org.osgi.service.blueprint.namespace.NamespaceHandler;
@@ -82,9 +81,9 @@
* @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
* @version $Rev: 760378 $, $Date: 2009-03-31 11:31:38 +0200 (Tue, 31 Mar 2009) $
*/
-public class BlueprintContextImpl implements ExtendedBlueprintContext, NamespaceHandlerRegistry.Listener, Runnable, SatisfiableRecipe.SatisfactionListener {
+public class BlueprintContainerImpl implements ExtendedBlueprintContainer, NamespaceHandlerRegistry.Listener, Runnable, SatisfiableRecipe.SatisfactionListener {
- private static final Logger LOGGER = LoggerFactory.getLogger(BlueprintContextImpl.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(BlueprintContainerImpl.class);
private enum State {
Unknown,
@@ -126,7 +125,7 @@
private boolean waitForDependencies = true;
private TimerTask timerTask;
- public BlueprintContextImpl(BundleContext bundleContext, BlueprintContextEventSender sender, NamespaceHandlerRegistry handlers, ExecutorService executors, Timer timer, List<URL> urls, boolean lazyActivation) {
+ public BlueprintContainerImpl(BundleContext bundleContext, BlueprintContextEventSender sender, NamespaceHandlerRegistry handlers, ExecutorService executors, Timer timer, List<URL> urls, boolean lazyActivation) {
this.bundleContext = bundleContext;
this.sender = sender;
this.handlers = handlers;
@@ -189,7 +188,7 @@
public synchronized void run() {
try {
for (;;) {
- LOGGER.debug("Running blueprint context for bundle {} in state {}", bundleContext.getBundle().getSymbolicName(), state);
+ LOGGER.debug("Running blueprint container for bundle {} in state {}", bundleContext.getBundle().getSymbolicName(), state);
switch (state) {
case Unknown:
checkDirectives();
@@ -221,11 +220,11 @@
trackServiceReferences();
timerTask = new TimerTask() {
public void run() {
- synchronized (BlueprintContextImpl.this) {
+ synchronized (BlueprintContainerImpl.this) {
Throwable t = new TimeoutException();
state = State.Failed;
// TODO: clean up
- LOGGER.error("Unable to start blueprint context for bundle " + bundleContext.getBundle().getSymbolicName(), t);
+ LOGGER.error("Unable to start blueprint container for bundle " + bundleContext.getBundle().getSymbolicName(), t);
sender.sendFailure(getBundleContext().getBundle(), t);
}
}
@@ -304,7 +303,7 @@
timerTask.cancel();
instantiateComponents();
- // Register the BlueprintContext in the OSGi registry
+ // Register the BlueprintContainer in the OSGi registry
if (registration == null) {
Properties props = new Properties();
props.put(BlueprintConstants.CONTEXT_SYMBOLIC_NAME_PROPERTY,
@@ -312,8 +311,8 @@
props.put(BlueprintConstants.CONTEXT_VERSION_PROPERTY,
bundleContext.getBundle().getHeaders().get(Constants.BUNDLE_VERSION));
// TODO: register a service factory so that we can honor the bundle scope when
- // BlueprintContext.getComponent(String) is called directly
- registration = bundleContext.registerService(BlueprintContext.class.getName(), this, props);
+ // BlueprintContainer.getComponent(String) is called directly
+ registration = bundleContext.registerService(BlueprintContainer.class.getName(), this, props);
sender.sendCreated(getBundleContext().getBundle());
state = State.Created;
@@ -328,7 +327,7 @@
} catch (Throwable t) {
state = State.Failed;
// TODO: clean up
- LOGGER.error("Unable to start blueprint context for bundle " + bundleContext.getBundle().getSymbolicName(), t);
+ LOGGER.error("Unable to start blueprint container for bundle " + bundleContext.getBundle().getSymbolicName(), t);
sender.sendFailure(getBundleContext().getBundle(), t);
}
}
@@ -702,7 +701,7 @@
destroyComponents();
sender.sendDestroyed(getBundleContext().getBundle());
- LOGGER.debug("Module context destroyed: " + this.bundleContext);
+ LOGGER.debug("Module container destroyed: " + this.bundleContext);
}
public synchronized void namespaceHandlerRegistered(URI uri) {
@@ -731,23 +730,23 @@
[bnd] "pool-3-thread-1" prio=5 tid=0x01018790 nid=0x8a2c00 in Object.wait() [0xb0f90000..0xb0f90d90]
[bnd] at java.lang.Object.wait(Native Method)
[bnd] - waiting on <0x25671928> (a java.lang.Object)
- [bnd] at org.apache.geronimo.blueprint.context.UnaryServiceReferenceRecipe.getService(UnaryServiceReferenceRecipe.java:197)
+ [bnd] at org.apache.geronimo.blueprint.container.UnaryServiceReferenceRecipe.getService(UnaryServiceReferenceRecipe.java:197)
[bnd] - locked <0x25671928> (a java.lang.Object)
- [bnd] at org.apache.geronimo.blueprint.context.UnaryServiceReferenceRecipe.access$000(UnaryServiceReferenceRecipe.java:55)
- [bnd] at org.apache.geronimo.blueprint.context.UnaryServiceReferenceRecipe$ServiceDispatcher.loadObject(UnaryServiceReferenceRecipe.java:225)
+ [bnd] at org.apache.geronimo.blueprint.container.UnaryServiceReferenceRecipe.access$000(UnaryServiceReferenceRecipe.java:55)
+ [bnd] at org.apache.geronimo.blueprint.container.UnaryServiceReferenceRecipe$ServiceDispatcher.loadObject(UnaryServiceReferenceRecipe.java:225)
[bnd] at org.osgi.test.cases.blueprint.services.ServiceManager$$EnhancerByCGLIB$$f740783d.getActiveServices(<generated>)
[bnd] at org.osgi.test.cases.blueprint.components.serviceimport.NullReferenceList.init(NullReferenceList.java:43)
[bnd] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[bnd] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[bnd] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[bnd] at java.lang.reflect.Method.invoke(Method.java:585)
- [bnd] at org.apache.geronimo.blueprint.context.BlueprintObjectRecipe.internalCreate(BlueprintObjectRecipe.java:586)
+ [bnd] at org.apache.geronimo.blueprint.container.BlueprintObjectRecipe.internalCreate(BlueprintObjectRecipe.java:586)
[bnd] at org.apache.geronimo.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:95)
- [bnd] at org.apache.geronimo.blueprint.context.BlueprintObjectInstantiator.createInstance(BlueprintObjectInstantiator.java:83)
- [bnd] at org.apache.geronimo.blueprint.context.BlueprintObjectInstantiator.createAll(BlueprintObjectInstantiator.java:65)
- [bnd] at org.apache.geronimo.blueprint.context.BlueprintContextImpl.instantiateComponents(BlueprintContextImpl.java:541)
- [bnd] at org.apache.geronimo.blueprint.context.BlueprintContextImpl.run(BlueprintContextImpl.java:303)
- [bnd] - locked <0x25730658> (a org.apache.geronimo.blueprint.context.BlueprintContextImpl)
+ [bnd] at org.apache.geronimo.blueprint.container.BlueprintObjectInstantiator.createInstance(BlueprintObjectInstantiator.java:83)
+ [bnd] at org.apache.geronimo.blueprint.container.BlueprintObjectInstantiator.createAll(BlueprintObjectInstantiator.java:65)
+ [bnd] at org.apache.geronimo.blueprint.container.BlueprintContextImpl.instantiateComponents(BlueprintContextImpl.java:541)
+ [bnd] at org.apache.geronimo.blueprint.container.BlueprintContextImpl.run(BlueprintContextImpl.java:303)
+ [bnd] - locked <0x25730658> (a org.apache.geronimo.blueprint.container.BlueprintContextImpl)
[bnd] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
[bnd] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
[bnd] at java.util.concurrent.FutureTask.run(FutureTask.java:123)
@@ -756,8 +755,8 @@
[bnd] at java.lang.Thread.run(Thread.java:613)
[bnd]
[bnd] "main" prio=5 tid=0x01001460 nid=0xb0801000 waiting for monitor entry [0xb07ff000..0xb0800148]
- [bnd] at org.apache.geronimo.blueprint.context.BlueprintContextImpl.destroy(BlueprintContextImpl.java:687)
- [bnd] - waiting to lock <0x25730658> (a org.apache.geronimo.blueprint.context.BlueprintContextImpl)
+ [bnd] at org.apache.geronimo.blueprint.container.BlueprintContextImpl.destroy(BlueprintContextImpl.java:687)
+ [bnd] - waiting to lock <0x25730658> (a org.apache.geronimo.blueprint.container.BlueprintContextImpl)
[bnd] at org.apache.geronimo.blueprint.BlueprintExtender.destroyContext(BlueprintExtender.java:121)
[bnd] at org.apache.geronimo.blueprint.BlueprintExtender.bundleChanged(BlueprintExtender.java:113)
[bnd] at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:916)
Copied: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintObjectInstantiator.java (from r776247, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BlueprintObjectInstantiator.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintObjectInstantiator.java?p2=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintObjectInstantiator.java&p1=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BlueprintObjectInstantiator.java&r1=776247&r2=776360&rev=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BlueprintObjectInstantiator.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintObjectInstantiator.java Tue May 19 15:40:47 2009
@@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.geronimo.blueprint.context;
+package org.apache.geronimo.blueprint.container;
import java.util.Arrays;
import java.util.Collection;
Copied: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintObjectRecipe.java (from r776331, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BlueprintObjectRecipe.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintObjectRecipe.java?p2=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintObjectRecipe.java&p1=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BlueprintObjectRecipe.java&r1=776331&r2=776360&rev=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BlueprintObjectRecipe.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BlueprintObjectRecipe.java Tue May 19 15:40:47 2009
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.geronimo.blueprint.context;
+package org.apache.geronimo.blueprint.container;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
@@ -36,7 +36,7 @@
import org.apache.geronimo.blueprint.BeanProcessor;
import org.apache.geronimo.blueprint.Destroyable;
-import org.apache.geronimo.blueprint.ExtendedBlueprintContext;
+import org.apache.geronimo.blueprint.ExtendedBlueprintContainer;
import org.apache.geronimo.blueprint.ExtendedComponentDefinitionRegistry;
import org.apache.geronimo.blueprint.di.AbstractRecipe;
import org.apache.geronimo.blueprint.di.ConstructionException;
@@ -68,10 +68,10 @@
private List<Class> argTypes;
private boolean reorderArguments;
- protected ExtendedBlueprintContext blueprintContext;
+ protected ExtendedBlueprintContainer blueprintContainer;
- public BlueprintObjectRecipe(ExtendedBlueprintContext blueprintContext, Class typeClass) {
- this.blueprintContext = blueprintContext;
+ public BlueprintObjectRecipe(ExtendedBlueprintContainer blueprintContainer, Class typeClass) {
+ this.blueprintContainer = blueprintContainer;
this.typeClass = typeClass;
allow(Option.LAZY_ASSIGNMENT);
}
@@ -485,7 +485,7 @@
protected Method getInitMethod(Object instance) throws ConstructionException {
Method method = null;
if (initMethod == null) {
- ExtendedComponentDefinitionRegistry registry = blueprintContext.getComponentDefinitionRegistry();
+ ExtendedComponentDefinitionRegistry registry = blueprintContainer.getComponentDefinitionRegistry();
method = ReflectionUtils.getLifecycleMethod(instance.getClass(), registry.getDefaultInitMethod());
} else if (initMethod.length() > 0) {
method = ReflectionUtils.getLifecycleMethod(instance.getClass(), initMethod);
@@ -503,7 +503,7 @@
public Method getDestroyMethod(Object instance) throws ConstructionException {
Method method = null;
if (destroyMethod == null) {
- ExtendedComponentDefinitionRegistry registry = blueprintContext.getComponentDefinitionRegistry();
+ ExtendedComponentDefinitionRegistry registry = blueprintContainer.getComponentDefinitionRegistry();
method = ReflectionUtils.getLifecycleMethod(instance.getClass(), registry.getDefaultDestroyMethod());
} else if (destroyMethod.length() > 0) {
method = ReflectionUtils.getLifecycleMethod(instance.getClass(), destroyMethod);
@@ -537,14 +537,14 @@
}
if (!keepRecipe) {
- // Add partially created object to the context
+ // Add partially created object to the container
addObject(obj, true);
}
// inject properties
setProperties(obj);
- for (BeanProcessor processor : blueprintContext.getBeanProcessors()) {
+ for (BeanProcessor processor : blueprintContainer.getBeanProcessors()) {
obj = processor.beforeInit(obj, getName());
}
@@ -561,7 +561,7 @@
}
if (!keepRecipe) {
- // Add fully created object to the context
+ // Add fully created object to the container
addObject(obj, false);
}
@@ -569,7 +569,7 @@
}
public void destroyInstance(Object obj) {
- for (BeanProcessor processor : blueprintContext.getBeanProcessors()) {
+ for (BeanProcessor processor : blueprintContainer.getBeanProcessors()) {
processor.beforeDestroy(obj, getName());
}
try {
@@ -580,7 +580,7 @@
} catch (Exception e) {
e.printStackTrace(); // TODO: log
}
- for (BeanProcessor processor : blueprintContext.getBeanProcessors()) {
+ for (BeanProcessor processor : blueprintContainer.getBeanProcessors()) {
processor.afterDestroy(obj, getName());
}
}
Copied: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BundleScopeServiceFactory.java (from r776247, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BundleScopeServiceFactory.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BundleScopeServiceFactory.java?p2=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BundleScopeServiceFactory.java&p1=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BundleScopeServiceFactory.java&r1=776247&r2=776360&rev=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BundleScopeServiceFactory.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/BundleScopeServiceFactory.java Tue May 19 15:40:47 2009
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.geronimo.blueprint.context;
+package org.apache.geronimo.blueprint.container;
import java.util.Collections;
import java.util.HashMap;
@@ -36,12 +36,12 @@
*/
public class BundleScopeServiceFactory implements ServiceFactory {
- private BlueprintContextImpl blueprintContext;
+ private BlueprintContainerImpl blueprintContainer;
private BlueprintObjectRecipe serviceRecipe;
private Map<Bundle, Entry> instanceMap = Collections.synchronizedMap(new HashMap<Bundle, Entry>());
- public BundleScopeServiceFactory(BlueprintContextImpl blueprintContext, BlueprintObjectRecipe serviceRecipe) {
- this.blueprintContext = blueprintContext;
+ public BundleScopeServiceFactory(BlueprintContainerImpl blueprintContainer, BlueprintObjectRecipe serviceRecipe) {
+ this.blueprintContainer = blueprintContainer;
this.serviceRecipe = serviceRecipe;
}
@@ -74,10 +74,10 @@
}
private Object createInstance() {
- Repository objectRepository = blueprintContext.getRepository();
+ Repository objectRepository = blueprintContainer.getRepository();
DefaultRepository repository = new DefaultRepository((DefaultRepository)objectRepository);
repository.set(serviceRecipe.getName(), serviceRecipe);
- ObjectGraph graph = new ObjectGraph(blueprintContext.getConversionService(), repository);
+ ObjectGraph graph = new ObjectGraph(blueprintContainer.getConversionService(), repository);
return graph.create(serviceRecipe.getName());
}
Copied: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/CollectionBasedServiceReferenceRecipe.java (from r776351, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/CollectionBasedServiceReferenceRecipe.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/CollectionBasedServiceReferenceRecipe.java?p2=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/CollectionBasedServiceReferenceRecipe.java&p1=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/CollectionBasedServiceReferenceRecipe.java&r1=776351&r2=776360&rev=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/CollectionBasedServiceReferenceRecipe.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/CollectionBasedServiceReferenceRecipe.java Tue May 19 15:40:47 2009
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.geronimo.blueprint.context;
+package org.apache.geronimo.blueprint.container;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
@@ -35,7 +35,7 @@
import net.sf.cglib.proxy.Dispatcher;
import org.apache.geronimo.blueprint.BlueprintContextEventSender;
import org.apache.geronimo.blueprint.Destroyable;
-import org.apache.geronimo.blueprint.ExtendedBlueprintContext;
+import org.apache.geronimo.blueprint.ExtendedBlueprintContainer;
import org.apache.geronimo.blueprint.di.ConstructionException;
import org.apache.geronimo.blueprint.di.Recipe;
import org.apache.geronimo.blueprint.utils.TypeUtils;
@@ -47,8 +47,8 @@
import org.apache.geronimo.blueprint.utils.DynamicSortedSet;
import org.osgi.framework.Constants;
import org.osgi.framework.ServiceReference;
-import org.osgi.service.blueprint.context.ComponentDefinitionException;
-import org.osgi.service.blueprint.context.ServiceUnavailableException;
+import org.osgi.service.blueprint.container.ComponentDefinitionException;
+import org.osgi.service.blueprint.container.ServiceUnavailableException;
import org.osgi.service.blueprint.reflect.RefCollectionMetadata;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -67,12 +67,12 @@
private final Recipe comparatorRecipe;
private ManagedCollection collection;
- public CollectionBasedServiceReferenceRecipe(ExtendedBlueprintContext blueprintContext,
+ public CollectionBasedServiceReferenceRecipe(ExtendedBlueprintContainer blueprintContainer,
BlueprintContextEventSender sender,
RefCollectionMetadata metadata,
Recipe listenersRecipe,
Recipe comparatorRecipe) {
- super(blueprintContext, sender, metadata, listenersRecipe);
+ super(blueprintContainer, sender, metadata, listenersRecipe);
this.metadata = metadata;
this.comparatorRecipe = comparatorRecipe;
}
@@ -111,13 +111,13 @@
throw new IllegalArgumentException("Unsupported collection type " + metadata.getCollectionType().getName());
}
- // Add partially created collection to the context
+ // Add partially created collection to the container
addObject(collection, true);
// Create the listeners and initialize them
createListeners();
- // Add fully created collection to the context
+ // Add fully created collection to the container
addObject(collection, false);
// Start tracking the service
Copied: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/DefaultBlueprintContextEventSender.java (from r776328, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/DefaultBlueprintContextEventSender.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/DefaultBlueprintContextEventSender.java?p2=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/DefaultBlueprintContextEventSender.java&p1=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/DefaultBlueprintContextEventSender.java&r1=776328&r2=776360&rev=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/DefaultBlueprintContextEventSender.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/DefaultBlueprintContextEventSender.java Tue May 19 15:40:47 2009
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.geronimo.blueprint.context;
+package org.apache.geronimo.blueprint.container;
import java.util.Dictionary;
import java.util.Hashtable;
@@ -32,8 +32,8 @@
import org.osgi.framework.ServiceRegistration;
import org.osgi.framework.Version;
import org.osgi.framework.ServiceReference;
-import org.osgi.service.blueprint.context.BlueprintContextListener;
-import org.osgi.service.blueprint.context.EventConstants;
+import org.osgi.service.blueprint.container.BlueprintContainerListener;
+import org.osgi.service.blueprint.container.EventConstants;
import org.osgi.service.event.Event;
import org.osgi.service.event.EventAdmin;
import org.osgi.util.tracker.ServiceTracker;
@@ -62,9 +62,9 @@
this.states = new ConcurrentHashMap<Bundle, Object>();
this.eventAdminServiceTracker = new ServiceTracker(bundleContext, EventAdmin.class.getName(), null);
this.eventAdminServiceTracker.open();
- this.contextListenerTracker = new ServiceTracker(bundleContext, BlueprintContextListener.class.getName(), new ServiceTrackerCustomizer() {
+ this.contextListenerTracker = new ServiceTracker(bundleContext, BlueprintContainerListener.class.getName(), new ServiceTrackerCustomizer() {
public Object addingService(ServiceReference reference) {
- BlueprintContextListener listener = (BlueprintContextListener) bundleContext.getService(reference);
+ BlueprintContainerListener listener = (BlueprintContainerListener) bundleContext.getService(reference);
sendInitialEvents(listener);
return listener;
}
@@ -78,7 +78,7 @@
this.registration = bundleContext.registerService(BlueprintStateManager.class.getName(), this, null);
}
- protected void sendInitialEvents(BlueprintContextListener listener) {
+ protected void sendInitialEvents(BlueprintContainerListener listener) {
if (states != null) {
for (Map.Entry<Bundle, Object> entry : states.entrySet()) {
callListener(listener, entry.getKey(), entry.getValue());
@@ -143,7 +143,7 @@
public void sendEvent(Bundle bundle, String topic, Throwable cause, String[] serviceObjectClass, String serviceFilter) {
- LOGGER.debug("Sending blueprint context event {} for bundle {}", topic, bundle.getSymbolicName());
+ LOGGER.debug("Sending blueprint container event {} for bundle {}", topic, bundle.getSymbolicName());
callListeners(bundle, topic, cause);
@@ -186,13 +186,13 @@
Object[] listeners = contextListenerTracker.getServices();
if (listeners != null) {
for (Object listener : listeners) {
- callListener((BlueprintContextListener) listener, bundle, created ? CREATED : cause != null ? cause : FAILED);
+ callListener((BlueprintContainerListener) listener, bundle, created ? CREATED : cause != null ? cause : FAILED);
}
}
}
}
- private void callListener(BlueprintContextListener listener, Bundle bundle, Object state) {
+ private void callListener(BlueprintContainerListener listener, Bundle bundle, Object state) {
// TODO: listener is missing a few methods to replay the state (at least WAITING events)
try {
if (state instanceof Integer) {
@@ -205,7 +205,7 @@
listener.contextCreationFailed(bundle, (Throwable) state);
}
} catch (Throwable t) {
- LOGGER.info("Error calling blueprint context listener", t);
+ LOGGER.info("Error calling blueprint container listener", t);
}
}
Copied: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java (from r776247, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java?p2=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java&p1=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java&r1=776247&r2=776360&rev=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java Tue May 19 15:40:47 2009
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.geronimo.blueprint.context;
+package org.apache.geronimo.blueprint.container;
import java.io.IOException;
import java.io.InputStream;
@@ -67,7 +67,7 @@
import org.apache.geronimo.blueprint.reflect.ServiceMetadataImpl;
import org.apache.geronimo.blueprint.reflect.ServiceReferenceMetadataImpl;
import org.apache.geronimo.blueprint.reflect.ValueMetadataImpl;
-import org.osgi.service.blueprint.context.ComponentDefinitionException;
+import org.osgi.service.blueprint.container.ComponentDefinitionException;
import org.osgi.service.blueprint.namespace.NamespaceHandler;
import org.osgi.service.blueprint.reflect.BeanArgument;
import org.osgi.service.blueprint.reflect.BeanMetadata;
Copied: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.java (from r776247, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/RecipeBuilder.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.java?p2=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.java&p1=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/RecipeBuilder.java&r1=776247&r2=776360&rev=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/RecipeBuilder.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/RecipeBuilder.java Tue May 19 15:40:47 2009
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.geronimo.blueprint.context;
+package org.apache.geronimo.blueprint.container;
import java.util.ArrayList;
import java.util.Collections;
@@ -26,7 +26,7 @@
import java.util.Map;
import java.util.Properties;
-import org.apache.geronimo.blueprint.ExtendedBlueprintContext;
+import org.apache.geronimo.blueprint.ExtendedBlueprintContainer;
import org.apache.geronimo.blueprint.ExtendedComponentDefinitionRegistry;
import org.apache.geronimo.blueprint.di.ArrayRecipe;
import org.apache.geronimo.blueprint.di.CollectionRecipe;
@@ -81,20 +81,20 @@
}
private int nameCounter;
- private BlueprintContextImpl blueprintContext;
+ private BlueprintContainerImpl blueprintContainer;
private ExtendedComponentDefinitionRegistry registry;
- public RecipeBuilder(BlueprintContextImpl blueprintContext) {
- this.blueprintContext = blueprintContext;
- this.registry = blueprintContext.getComponentDefinitionRegistry();
+ public RecipeBuilder(BlueprintContainerImpl blueprintContainer) {
+ this.blueprintContainer = blueprintContainer;
+ this.registry = blueprintContainer.getComponentDefinitionRegistry();
}
private void addBuiltinComponents(DefaultRepository repository) {
- if (blueprintContext != null) {
- repository.putDefault("blueprintContext", blueprintContext);
- repository.putDefault("bundleContext", blueprintContext.getBundleContext());
- repository.putDefault("bundle", blueprintContext.getBundleContext().getBundle());
- repository.putDefault("conversionService", blueprintContext.getConversionService());
+ if (blueprintContainer != null) {
+ repository.putDefault("blueprintContainer", blueprintContainer);
+ repository.putDefault("bundleContext", blueprintContainer.getBundleContext());
+ repository.putDefault("bundle", blueprintContainer.getBundleContext().getBundle());
+ repository.putDefault("conversionService", blueprintContainer.getConversionService());
}
}
@@ -142,8 +142,8 @@
comparatorRecipe = getValue(metadata.getComparator(), Comparator.class);
}
CollectionBasedServiceReferenceRecipe recipe = new CollectionBasedServiceReferenceRecipe(
- blueprintContext,
- blueprintContext.getSender(),
+ blueprintContainer,
+ blueprintContainer.getSender(),
metadata,
listenersRecipe,
comparatorRecipe);
@@ -160,8 +160,8 @@
listenersRecipe.add(createRecipe(listener));
}
}
- UnaryServiceReferenceRecipe recipe = new UnaryServiceReferenceRecipe(blueprintContext,
- blueprintContext.getSender(),
+ UnaryServiceReferenceRecipe recipe = new UnaryServiceReferenceRecipe(blueprintContainer,
+ blueprintContainer.getSender(),
metadata,
listenersRecipe);
recipe.setAllowPartial(true);
@@ -170,16 +170,16 @@
}
private BlueprintObjectRecipe createServiceRecipe(ServiceMetadata serviceExport) throws Exception {
- BlueprintObjectRecipe recipe = new BlueprintObjectRecipe(blueprintContext, ServiceRegistrationProxy.class);
+ BlueprintObjectRecipe recipe = new BlueprintObjectRecipe(blueprintContainer, ServiceRegistrationProxy.class);
recipe.setName(getName(serviceExport.getId()));
recipe.setExplicitDependencies(serviceExport.getExplicitDependencies());
recipe.setInitMethod("init");
recipe.setAllowPartial(true);
- recipe.setProperty("blueprintContext", blueprintContext);
+ recipe.setProperty("blueprintContainer", blueprintContainer);
BeanMetadata exportedComponent = getLocalServiceComponent(serviceExport.getServiceComponent());
if (exportedComponent != null && BeanMetadata.SCOPE_BUNDLE.equals(exportedComponent.getScope())) {
BlueprintObjectRecipe exportedComponentRecipe = createBeanRecipe(exportedComponent);
- recipe.setProperty("service", new BundleScopeServiceFactory(blueprintContext, exportedComponentRecipe));
+ recipe.setProperty("service", new BundleScopeServiceFactory(blueprintContainer, exportedComponentRecipe));
} else {
recipe.setProperty("service", getValue(serviceExport.getServiceComponent(), null));
}
@@ -213,7 +213,7 @@
private BlueprintObjectRecipe createBeanRecipe(BeanMetadata local) throws Exception {
Class clazz = local.getRuntimeClass() != null ? local.getRuntimeClass() : loadClass(local.getClassName());
- BlueprintObjectRecipe recipe = new BlueprintObjectRecipe(blueprintContext, clazz);
+ BlueprintObjectRecipe recipe = new BlueprintObjectRecipe(blueprintContainer, clazz);
recipe.setName(getName(local.getId()));
recipe.setExplicitDependencies(local.getExplicitDependencies());
for (BeanProperty property : local.getProperties()) {
@@ -261,14 +261,14 @@
}
private Recipe createRecipe(RegistrationListener listener) throws Exception {
- BlueprintObjectRecipe recipe = new BlueprintObjectRecipe(blueprintContext, ServiceRegistrationProxy.Listener.class);
+ BlueprintObjectRecipe recipe = new BlueprintObjectRecipe(blueprintContainer, ServiceRegistrationProxy.Listener.class);
recipe.setProperty("listener", getValue(listener.getListenerComponent(), null));
recipe.setProperty("metadata", listener);
return recipe;
}
private Recipe createRecipe(Listener listener) throws Exception {
- BlueprintObjectRecipe recipe = new BlueprintObjectRecipe(blueprintContext, AbstractServiceReferenceRecipe.Listener.class);
+ BlueprintObjectRecipe recipe = new BlueprintObjectRecipe(blueprintContainer, AbstractServiceReferenceRecipe.Listener.class);
recipe.setProperty("listener", getValue(listener.getListenerComponent(), null));
recipe.setProperty("metadata", listener);
return recipe;
@@ -350,11 +350,11 @@
}
protected ConversionService getConversionService() {
- return blueprintContext.getConversionService();
+ return blueprintContainer.getConversionService();
}
private Class loadClass(String typeName) throws ClassNotFoundException {
- return loadClass(blueprintContext, typeName);
+ return loadClass(blueprintContainer, typeName);
}
private String getName(String name) {
@@ -365,7 +365,7 @@
}
}
- public static Class loadClass(ExtendedBlueprintContext context, String typeName) throws ClassNotFoundException {
+ public static Class loadClass(ExtendedBlueprintContainer context, String typeName) throws ClassNotFoundException {
if (typeName == null) {
return null;
}
Copied: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/SatisfiableRecipe.java (from r776247, geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/SatisfiableRecipe.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/SatisfiableRecipe.java?p2=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/SatisfiableRecipe.java&p1=geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/SatisfiableRecipe.java&r1=776247&r2=776360&rev=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/SatisfiableRecipe.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/SatisfiableRecipe.java Tue May 19 15:40:47 2009
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.geronimo.blueprint.context;
+package org.apache.geronimo.blueprint.container;
import org.apache.geronimo.blueprint.di.Recipe;
Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceReferenceTracker.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceReferenceTracker.java?rev=776360&r1=776245&r2=776360&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceReferenceTracker.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceReferenceTracker.java Tue May 19 15:40:47 2009
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.geronimo.blueprint.context;
+package org.apache.geronimo.blueprint.container;
import java.util.ArrayList;
import java.util.List;