Author: dkulp
Date: Tue Dec 18 21:38:09 2012
New Revision: 1423677
URL: http://svn.apache.org/viewvc?rev=1423677&view=rev
Log:
Since the bundleContext is injected, we can use it instead of calling into the
deprecated interface that may be removed.
Modified:
camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/CamelContextFactoryBean.java
Modified:
camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/CamelContextFactoryBean.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/CamelContextFactoryBean.java?rev=1423677&r1=1423676&r2=1423677&view=diff
==============================================================================
---
camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/CamelContextFactoryBean.java
(original)
+++
camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/CamelContextFactoryBean.java
Tue Dec 18 21:38:09 2012
@@ -28,7 +28,6 @@ import javax.xml.bind.annotation.XmlElem
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
-import org.apache.aries.blueprint.ExtendedBlueprintContainer;
import org.apache.camel.RoutesBuilder;
import org.apache.camel.ShutdownRoute;
import org.apache.camel.ShutdownRunningTask;
@@ -261,7 +260,7 @@ public class CamelContextFactoryBean ext
protected void findRouteBuildersByPackageScan(String[] packages,
PackageScanFilter filter, List<RoutesBuilder> builders) throws Exception {
// add filter to class resolver which then will filter
getContext().getPackageScanClassResolver().addFilter(filter);
- ClassLoader classLoader = new
BundleDelegatingClassLoader(((ExtendedBlueprintContainer)
blueprintContainer).getBundleContext().getBundle());
+ ClassLoader classLoader = new
BundleDelegatingClassLoader(bundleContext.getBundle());
PackageScanRouteBuilderFinder finder = new
PackageScanRouteBuilderFinder(getContext(), packages, classLoader,
getContext().getPackageScanClassResolver());
finder.appendBuilders(builders);
@@ -280,7 +279,7 @@ public class CamelContextFactoryBean ext
public void afterPropertiesSet() throws Exception {
super.afterPropertiesSet();
// setup the application context classloader with the bundle
delegating classloader
- ClassLoader cl = new
BundleDelegatingClassLoader(((ExtendedBlueprintContainer)
blueprintContainer).getBundleContext().getBundle());
+ ClassLoader cl = new
BundleDelegatingClassLoader(bundleContext.getBundle());
LOG.debug("Set the application context classloader to: {}", cl);
getContext().setApplicationContextClassLoader(cl);
getContext().getManagementStrategy().addEventNotifier(new
OsgiCamelContextPublisher(bundleContext));