Products | Versions |
---|---|
TIBCO ActiveMatrix BusinessWorks | - |
Not Applicable | - |
Review the following section in the attached sample.
+++
String[] ctxLocations = {"lib/applicationContext.xml"};
OsgiBundleXmlApplicationContext ctx = new OsgiBundleXmlApplicationContext(ctxLocations);
BundleContext bundleContext = FrameworkUtil.getBundle(this.getClass()).getBundleContext();
ctx.setBundleContext(bundleContext);
ctx.refresh();
BeanFactory factory = (BeanFactory) ctx;
HelloWorld bean = (HelloWorld) factory.getBean("helloWorld", HelloWorld.class);
+++
If the Spring configuration is part of an external JAR file, the context loading can be modified. A screenshot from Studio is attached for clarity (Filename: spring.png).
String[] ctxLocations = {"classpath*:**/applicationContext*.xml"};
Note that this is a known issue with Spring integration in BW 6.3.1(AMBW-22073) due to Java being upgraded to 1.8 .