Package org.jencks

Examples of org.jencks.SingletonEndpointFactory


                ac.setDestination(INBOUND_PREFIX + key);
                JCAConnector connector = new JCAConnector();
                connector.setBootstrapContext(getBootstrapContext());
                connector.setActivationSpec(ac);
                connector.setResourceAdapter(resourceAdapter);
                connector.setEndpointFactory(new SingletonEndpointFactory(this, getTransactionManager()));
                connector.start();
                connectorMap.put(key, connector);
            }
            // broadcast change to the network
            if (broadcast) {
View Full Code Here


                ac.setDestination(INBOUND_PREFIX + key);
                JCAConnector connector = new JCAConnector();
                connector.setBootstrapContext(getBootstrapContext());
                connector.setActivationSpec(ac);
                connector.setResourceAdapter(resourceAdapter);
                connector.setEndpointFactory(new SingletonEndpointFactory(this, getTransactionManager()));
                connector.start();
                connectorMap.put(key, connector);
            }
        } catch (Exception e) {
            log.error("Cannot create consumer for component " + event.getComponent().getName(), e);
View Full Code Here

    public void start() throws Exception {
        AsyncBaseLifeCycle lf = (AsyncBaseLifeCycle) endpoint.getServiceUnit().getComponent().getLifeCycle();
        channel = lf.getContext().getDeliveryChannel();
        transactionManager = (TransactionManager) lf.getContext().getTransactionManager();
        endpointFactory = new SingletonEndpointFactory(this, transactionManager);
        bootstrapContext = endpoint.getBootstrapContext();
        if (bootstrapContext == null) {
            throw new IllegalArgumentException("bootstrapContext not set");
        }
        connectionFactory = endpoint.getConnectionFactory();
View Full Code Here

        private Executor executor;

        public Connector(ActiveMQDestination destination, MessageListener listener, boolean transacted) {
            ra = new ActiveMQResourceAdapter();
            ra.setConnectionFactory(connectionFactory);
            SingletonEndpointFactory ef = new SingletonEndpointFactory(listener, transacted ? getTransactionManager() : null);
            ef.setName(INBOUND_PREFIX + broker.getContainer().getName());
            endpointFactory = ef;
            spec = new ActiveMQActivationSpec();
            spec.setActiveMQDestination(destination);
        }
View Full Code Here

          transactionManager = (TransactionManager) getContext().getTransactionManager();
        }
        if (transactionManager != null) {
            jcaConnector.setTransactionManager(transactionManager);
        }
        SingletonEndpointFactory ef = new SingletonEndpointFactory(this, transactionManager);
        ef.setName(name);
        jcaConnector.setEndpointFactory(ef);
        try {
          jcaConnector.afterPropertiesSet();
        } catch (Exception e) {
          throw new JBIException("Unable to initialize jca connector", e);
View Full Code Here

        private Executor executor;

        public Connector(ActiveMQDestination destination, MessageListener listener, boolean transacted) {
            ra = new ActiveMQResourceAdapter();
            ra.setConnectionFactory(connectionFactory);
            SingletonEndpointFactory ef = new SingletonEndpointFactory(listener, transacted ? getTransactionManager() : null);
            ef.setName(INBOUND_PREFIX + broker.getContainer().getName());
            endpointFactory = ef;
            spec = new ActiveMQActivationSpec();
            spec.setActiveMQDestination(destination);
        }
View Full Code Here

        private Executor executor;

        public Connector(ActiveMQDestination destination, MessageListener listener, boolean transacted) {
            ra = new ActiveMQResourceAdapter();
            ra.setConnectionFactory(connectionFactory);
            SingletonEndpointFactory ef = new SingletonEndpointFactory(listener, transacted ? getTransactionManager() : null);
            ef.setName(INBOUND_PREFIX + broker.getContainer().getName());
            endpointFactory = ef;
            spec = new ActiveMQActivationSpec();
            spec.setActiveMQDestination(destination);
        }
View Full Code Here

          transactionManager = (TransactionManager) getContext().getTransactionManager();
        }
        if (transactionManager != null) {
            jcaConnector.setTransactionManager(transactionManager);
        }
        SingletonEndpointFactory ef = new SingletonEndpointFactory(this, transactionManager);
        ef.setName(name);
        jcaConnector.setEndpointFactory(ef);
        try {
          jcaConnector.afterPropertiesSet();
        } catch (Exception e) {
          throw new JBIException("Unable to initialize jca connector", e);
View Full Code Here

        private ActiveMQActivationSpec spec;
        private Executor executor;
        public Connector(ActiveMQDestination destination, MessageListener listener, boolean transacted) {
            ra = new ActiveMQResourceAdapter();
            ra.setConnectionFactory(connectionFactory);
            SingletonEndpointFactory ef = new SingletonEndpointFactory(listener, transacted ? getTransactionManager() : null);
            ef.setName(INBOUND_PREFIX + broker.getContainer().getName());
            endpointFactory = ef;
            spec = new ActiveMQActivationSpec();
            spec.setActiveMQDestination(destination);
        }
View Full Code Here

        super(endpoint);
    }

    public void start() throws Exception {
        transactionManager = (TransactionManager) context.getTransactionManager();
        endpointFactory = new SingletonEndpointFactory(this, transactionManager);
        bootstrapContext = endpoint.getBootstrapContext();
        if (bootstrapContext == null) {
            throw new IllegalArgumentException("bootstrapContext not set");
        }
        connectionFactory = endpoint.getConnectionFactory();
View Full Code Here

TOP

Related Classes of org.jencks.SingletonEndpointFactory

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.