blob: c1aaf1570f4cedd081fa15909acdaa2400a40825 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package org.apache.tuscany.sca.implementation.spring.runtime.context;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.GenericApplicationContext;
public class SCAGenericApplicationContext extends GenericApplicationContext {
ClassLoader classloader = null;
public SCAGenericApplicationContext(DefaultListableBeanFactory beanFactory,
ApplicationContext parent,
ClassLoader classloader) {
super(beanFactory, parent);
this.classloader = classloader;
}
public SCAGenericApplicationContext(ApplicationContext parent,
ClassLoader classloader) {
super(parent);
this.classloader = classloader;
}
@Override
protected void postProcessBeanFactory (ConfigurableListableBeanFactory beanFactory) {
beanFactory.setBeanClassLoader(classloader);
}
}
|