Package org.apache.servicemix.jbi.container

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


        String endpointName = config.getInitParameter("endpoint");
        if (endpointName == null) {
            throw new ServletException("You must configure a servlet config parameter of endpointRef");
        }
       
        SpringJBIContainer jbi = (SpringJBIContainer) applicationContext.getBean(jbiName);
        if (jbi == null) {
            throw new ServletException("Could not find the JBIContainer in the Spring application context for name: " + jbiName);
        }
       
        Object value = jbi.getBean(endpointName);
        if (value == null) {
            throw new ServletException("Could not find bean in the SpringJBIContainer for id: " + endpointName);
        }
        if (value instanceof HttpBinding) {
            return (HttpBinding) value;
View Full Code Here


    protected Receiver receiver;

    protected void setUp() throws Exception {
        super.setUp();
        client = (ServiceMixClient) getBean("client");
        SpringJBIContainer jbi = (SpringJBIContainer) getBean("jbi");
        receiver = (Receiver) jbi.getBean("receiver");
    }
View Full Code Here

                context = new FileSystemXmlApplicationContext(new String[] {file}, false, processors);
            }
            context.setValidating(false);
            context.refresh();
           
            SpringJBIContainer container = (SpringJBIContainer) context.getBean("jbi");           
            container.onShutDown(new Runnable() {
                public void run() {
                    if (context instanceof DisposableBean) {
                        try {
                            ((DisposableBean) context).destroy();
                        } catch (Exception e) {
                            System.out.println("Caught: " + e);
                            e.printStackTrace();
                        }
                    }
                }
            });
            //this is for classworlds 1.1 launcher which use System.exit()
            //explicitly after lauch Main. To avoid System.exit() being invoked
            //during servicemix runing, we need keep ServiceMix main thread alive.
            container.block();
           
        } catch (Exception e) {
            System.out.println("Caught: " + e);
            e.printStackTrace();
        }
View Full Code Here

  public static void main(String[] args) {
    // This is a very simple example of how you might embed ServiceMix
    try {
      final ApplicationContext context = new ClassPathXmlApplicationContext("servicemix.xml");

      SpringJBIContainer container = (SpringJBIContainer) context.getBean("jbi");
            container.onShutDown(new Runnable() {
                public void run() {
                    if (context instanceof DisposableBean) {
                        try {
                            ((DisposableBean) context).destroy();
                        } catch (Exception e) {
View Full Code Here

                List processors = new ArrayList();
                processors.add(new ClassLoaderXmlPreprocessor(new FileSystemRepository(new File("."))));
                System.out.println("Loading Apache ServiceMix from file: " + file);
                context = new FileSystemXmlApplicationContext(file, processors);
            }
            SpringJBIContainer container = (SpringJBIContainer) context.getBean("jbi");
            container.onShutDown(new Runnable() {
                public void run() {
                    if (context instanceof DisposableBean) {
                        try {
                            ((DisposableBean) context).destroy();
                        } catch (Exception e) {
View Full Code Here

                List processors = new ArrayList();
                processors.add(new ClassLoaderXmlPreprocessor(new File(".")));
                System.out.println("Loading Apache ServiceMix from file: " + file);
                context = new FileSystemXmlApplicationContext(file, processors);
            }
            SpringJBIContainer container = (SpringJBIContainer) context.getBean("jbi");           
            container.onShutDown(new Runnable() {
                public void run() {
                    if (context instanceof DisposableBean) {
                        try {
                            ((DisposableBean) context).destroy();
                        } catch (Exception e) {
View Full Code Here

        client = (ServiceMixClient) getBean("client");

        // TODO
        //receiver = (Receiver) getBean("receiver");

        SpringJBIContainer jbi = (SpringJBIContainer) getBean("jbi");
        receiver = (Receiver) jbi.getBean("receiver");
        assertNotNull("receiver not found in JBI container", receiver);
    }
View Full Code Here

        client = (ServiceMixClient) getBean("client");

        // TODO
        //receiver = (Receiver) getBean("receiver");

        SpringJBIContainer jbi = (SpringJBIContainer) getBean("jbi");
        assertNotNull(jbi);
    }
View Full Code Here

        client = (ServiceMixClient) getBean("client");

        // TODO
        //receiver = (Receiver) getBean("receiver");

        SpringJBIContainer jbi = (SpringJBIContainer) getBean("jbi");
        receiver = (Receiver) jbi.getBean("receiver");
        assertNotNull("receiver not found in JBI container", receiver);
    }
View Full Code Here

    protected ServiceMixClient client;
    protected Receiver receiver;

  protected void setUp() throws Exception {
    super.setUp();
        SpringJBIContainer jbi = (SpringJBIContainer) getBean("jbi");
        receiver = (Receiver) jbi.getBean("receiver");
    }
View Full Code Here

TOP

Related Classes of org.apache.servicemix.jbi.container.SpringJBIContainer

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.