public void setUp() throws Exception { // Remove jbi workspace // IOUtils.deleteFile(new File("target/.mule-jbi")); // Create jbi container JbiContainerImpl jbi = new JbiContainerImpl(); jbi.setWorkingDir(new File("target/.mule-jbi")); container = jbi; // Initialize jbi container.initialize(); // Create components provider = new TestComponent("provider"); consumer = new TestComponent("consumer"); // Register components container .getRegistry() .addTransientComponent("provider", ComponentType.JBI_ENGINE_COMPONENT, provider, null); container .getRegistry() .addTransientComponent("consumer", ComponentType.JBI_ENGINE_COMPONENT, consumer, null); // Start jbi container.start(); // Activate endpoint endpoint = provider.getContext().activateEndpoint(SERVICE_NAME, ENDPOINT_NAME); }
public DeploymentService(JbiContainer container) { this.container = container; this.registry = container.getRegistry(); }