Author: gnodet
Date: Mon Sep 4 08:05:01 2006
New Revision: 440100
URL: http://svn.apache.org/viewvc?view=rev&rev=440100
Log:
Use xbean api to retrieve the class loader
Modified:
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/XBeanServiceUnit.java
Modified:
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/XBeanServiceUnit.java
URL:
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/XBeanServiceUnit.java?view=diff&rev=440100&r1=440099&r2=440100
==============================================================================
---
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/XBeanServiceUnit.java
(original)
+++
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/XBeanServiceUnit.java
Mon Sep 4 08:05:01 2006
@@ -18,9 +18,9 @@
import org.apache.servicemix.common.ServiceUnit;
import org.apache.xbean.kernel.Kernel;
+import org.apache.xbean.kernel.ServiceFactory;
import org.apache.xbean.kernel.ServiceName;
import org.apache.xbean.kernel.ServiceNotFoundException;
-import
org.apache.xbean.server.spring.configuration.SpringConfigurationServiceFactory;
import javax.jbi.JBIException;
@@ -64,9 +64,8 @@
public ClassLoader getConfigurationClassLoader() throws
ServiceNotFoundException {
ClassLoader cl = null;
if (kernel != null) {
- Object o = kernel.getServiceFactory(configuration);
- SpringConfigurationServiceFactory scsf =
(SpringConfigurationServiceFactory) o;
- cl = scsf.getApplicationContext().getClassLoader();
+ ServiceFactory sf = kernel.getServiceFactory(configuration);
+ cl = sf.getClassLoader();
}
if (cl == null) {
cl = Thread.currentThread().getContextClassLoader();