Examples of JBIContainer


Examples of org.apache.servicemix.jbi.container.JBIContainer

public class JbiProxyTest extends TestCase {

    protected JBIContainer container;
   
    protected void setUp() throws Exception {
        container = new JBIContainer();
        container.setUseMBeanServer(false);
        container.setCreateMBeanServer(false);
        container.setMonitorInstallationDirectory(false);
        container.setNamingContext(new InitialContext());
        container.setEmbedded(true);
View Full Code Here

Examples of org.mule.jbi.JbiContainer

        addMessageRouterRules(digester, path, "response");

        digester.addRule(path, new Rule(){
            public void end(String s, String s1) throws Exception {
                AbstractComponent c = (AbstractComponent)digester.peek();
                JbiContainer cont = ((JbiContainer)digester.getRoot());
                c.setContainer(cont);
                cont.getRegistry().addTransientComponent(c.getName(), ComponentType.JBI_ENGINE_COMPONENT, c, c.getBootstrap());
            }
        });
    }
View Full Code Here

Examples of org.servicemix.jbi.container.JBIContainer

   
    public void testXBeanJbi() throws Exception {
        createJarFile();
        File path = new File("target/test-classes/xbean");
        XBeanComponent component = new XBeanComponent();
        JBIContainer container = new JBIContainer();
        container.init();
        container.start();
        container.activateComponent(new ActivationSpec("xbean", component));
        component.getServiceUnitManager().deploy("xbean", path.getAbsolutePath());
        component.start("xbean");
        component.stop("xbean");
        component.getServiceUnitManager().shutDown("xbean");
        component.getServiceUnitManager().undeploy("xbean", path.getAbsolutePath());
View Full Code Here

Examples of org.servicemix.jbi.container.JBIContainer

* @version $Revision: 750 $
*/
public abstract class AbstractPersistenceTest extends AbstractTransactionTest {

    protected JBIContainer createJbiContainer(String name) throws Exception {
      JBIContainer container = new JBIContainer();
        container.setTransactionManager(tm);
        container.setName(name);
        container.setFlow(createFlow());
        container.setPersistent(true);
        container.setMonitorInstallationDirectory(false);
        container.init();
        container.start();
        return container;
    }
View Full Code Here

Examples of org.servicemix.jbi.container.JBIContainer

    protected JBIContainer container;
    protected DeliveryChannel channel;
   
    protected void setUp() throws Exception {
        container = new JBIContainer();
        container.init();
        container.start();
        SenderComponent component = new SenderComponent();
        container.activateComponent(new ActivationSpec("sender", component));
        channel = component.getDeliveryChannel();
View Full Code Here

Examples of org.servicemix.jbi.container.JBIContainer

    protected JBIContainer container;
    protected SourceTransformer transformer = new SourceTransformer();
   
    protected void setUp() throws Exception {
        container = new JBIContainer();
        container.init();
        container.start();
    }
View Full Code Here

Examples of org.servicemix.jbi.container.JBIContainer

     * Create a RemoteServiceMixClient
     * @param uri
     * @param activationSpec
     */
    public RemoteServiceMixClient(String uri,ActivationSpec activationSpec){
        container = new JBIContainer();
        this.uri = uri;
        this.activationSpec = activationSpec;

    }
View Full Code Here

Examples of org.servicemix.jbi.container.JBIContainer

public class JXAWSComponentTest extends TestCase {

    protected JBIContainer container;
   
    protected void setUp() throws Exception {
        container = new JBIContainer();
        container.init();
        container.start();
    }
View Full Code Here

Examples of org.servicemix.jbi.container.JBIContainer

   *
   * @see org.jboss.system.ServiceMBeanSupport#startService()
   */
  public void startService() throws Exception {

    jbiContainer = new JBIContainer();
    jbiContainer.setCreateMBeanServer(false);
    jbiContainer.setMonitorInstallationDirectory(false);
    jbiContainer.setMBeanServer(getServer());

    // TODO Keeping the service mix configuration directory in place is a
View Full Code Here

Examples of org.servicemix.jbi.container.JBIContainer

    public void testSedaSedaSync() throws Exception {
        runTest("seda", "seda", true);
    }
   
  private void runTest(String flowName, String subscriptionFlowName, boolean sync) throws Exception {
    JBIContainer container = new JBIContainer();
    try {
      container.getBroker().setFlow(FlowProvider.getFlow(flowName));
      if (subscriptionFlowName != null) {
        container.getBroker().getSubscriptionManager().setFlow(FlowProvider.getFlow(subscriptionFlowName));
      }
            // TODO: check why the following line is enabled, there is
            // a 5 seconds pause when Management stuff is initialized
      //container.setCreateMBeanServer(true);
      container.init();
      container.start();
     
      SenderListener sender = new SenderListener();
            ActivationSpec senderActivationSpec = new ActivationSpec("sender", sender);
            senderActivationSpec.setFailIfNoDestinationEndpoint(false);
      container.activateComponent(senderActivationSpec);
     
      Receiver receiver1 = new ReceiverComponent();
      container.activateComponent(createReceiverAS("receiver1", receiver1));
 
      Receiver receiver2 = new ReceiverComponent();
      container.activateComponent(createReceiverAS("receiver2", receiver2));
     
      sender.sendMessages(1, sync);
     
      Thread.sleep(100);
     
      assertEquals(1, receiver1.getMessageList().getMessageCount());
      assertEquals(1, receiver2.getMessageList().getMessageCount());
      assertEquals(0, sender.responses.size());
    } finally {
      container.shutDown();
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.