1 17 package org.apache.servicemix.bpe; 18 19 import org.apache.servicemix.common.BaseComponent; 20 import org.apache.servicemix.common.BaseLifeCycle; 21 22 import org.apache.ode.bpe.bped.EventDirector; 23 import org.apache.ode.bpe.bped.EventDirectorFactory; 24 import org.apache.ode.bpe.util.BPEProperties; 25 26 public class BPELifeCycle extends BaseLifeCycle { 27 28 public static final String IM_ENGINE_PROPERTY_FILE_NAME = "bpeEngine.properties"; 29 30 private EventDirector eventDirector; 31 32 public BPELifeCycle(BaseComponent component) { 33 super(component); 34 } 35 36 public EventDirector getEventDirector() { 37 return eventDirector; 38 } 39 40 protected void doInit() throws Exception { 41 BPEProperties props = BPEProperties.getCachedProperties(); 42 props.load(getClass().getClassLoader().getResourceAsStream(IM_ENGINE_PROPERTY_FILE_NAME)); 43 eventDirector = EventDirectorFactory.createEventDirector(props); 44 super.doInit(); 45 } 46 47 } 48 | Popular Tags |