// REVIEW andyp -- pass in deploymentContext.getClassLoader()?
AbstractRefreshableApplicationContext ctx;
if (runtimeInfo instanceof SpringRuntimeInfo) {
ctx = ((SpringRuntimeInfo) runtimeInfo).getApplicationContext();
} else {
ctx = new ScaApplicationContext(resource, componentType);
}
componentType.setApplicationContext(ctx); // FIXME andyp@bea.com -- don't do this!
// If there are <sca:service> elements, they define (and limit) the services exposed
// in the componentType.