* (non-Javadoc)
*
* @see org.apache.servicemix.common.packaging.ServiceUnitAnalyzer#init(java.io.File)
*/
public void init(File explodedServiceUnitRoot) {
FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext(
new String[] { "file:///" + explodedServiceUnitRoot.getAbsolutePath() + "/" + getXBeanFile() },
false);
List beanFactoryPostProcessors = getBeanFactoryPostProcessors(explodedServiceUnitRoot.getAbsolutePath());
for (Iterator iter = beanFactoryPostProcessors.iterator(); iter.hasNext();) {
BeanFactoryPostProcessor processor = (BeanFactoryPostProcessor) iter.next();
context.addBeanFactoryPostProcessor(processor);
}
context.refresh();
for (int i = 0; i < context.getBeanDefinitionNames().length; i++) {
Object bean = context.getBean(context.getBeanDefinitionNames()[i]);
if (isValidEndpoint(bean)) {
// The provides are generic while the consumes need to
// be handled by the implementation
Endpoint endpoint = (Endpoint) bean;
provides.addAll(getProvides(endpoint));