Package org.servicemix.jbi.container

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


* @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

    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

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

     * 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

public class JXAWSComponentTest extends TestCase {

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

   *
   * @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

    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

    ManagementContext context;

    protected void setUp() throws Exception {
        context = new ManagementContext();
        context.setCreateMBeanServer(true);
        context.init(new JBIContainer(), null);
    }
View Full Code Here

    protected JBIContainer container;
    protected OutBinding out;
    protected ServiceMixClient client;

    protected void setUp() throws Exception {
        container = new JBIContainer();
        container.init();
        container.start();
        out = new OutBinding() {
            protected void process(MessageExchange exchange, NormalizedMessage message) throws MessagingException {
                System.out.println("Received: " + message);
View Full Code Here

TOP

Related Classes of org.servicemix.jbi.container.JBIContainer

Copyright © 2018 www.massapicom. 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.