Package org.apache.cxf.workqueue

Examples of org.apache.cxf.workqueue.WorkQueueManager


                    }
                };
                try {
                    Executor ex = outMessage.getExchange().get(Executor.class);
                    if (ex == null) {
                        WorkQueueManager mgr = outMessage.getExchange().get(Bus.class)
                            .getExtension(WorkQueueManager.class);
                        AutomaticWorkQueue qu = mgr.getNamedWorkQueue("http-conduit");
                        if (ex == null) {
                            qu = mgr.getAutomaticWorkQueue();
                        }
                        qu.execute(runnable, 5000);
                    } else {
                        outMessage.getExchange().put(Executor.class.getName()
                                                 + ".USING_SPECIFIED", Boolean.TRUE);
View Full Code Here


       
        if (executor == null || SynchronousExecutor.isA(executor)) {
            // need true asynchrony
            Bus bus = message.getExchange().get(Bus.class);
            if (bus != null) {
                WorkQueueManager workQueueManager =
                    bus.getExtension(WorkQueueManager.class);
                Executor autoWorkQueue =
                    workQueueManager.getNamedWorkQueue("ws-addressing");
                executor = autoWorkQueue != null
                           ? autoWorkQueue
                           :  workQueueManager.getAutomaticWorkQueue();
            } else {
                executor = OneShotAsyncExecutor.getInstance();
            }
        }
        message.getExchange().put(Executor.class, executor);
View Full Code Here

                        }
                    }
                };
                Executor ex = outMessage.getExchange().get(Executor.class);
                if (ex == null) {
                    WorkQueueManager mgr = outMessage.getExchange().get(Bus.class)
                        .getExtension(WorkQueueManager.class);
                    ex = mgr.getNamedWorkQueue("http-conduit");
                    if (ex == null) {
                        ex = mgr.getAutomaticWorkQueue();
                    }
                } else {
                    outMessage.getExchange().put(Executor.class.getName()
                                                 + ".USING_SPECIFIED", Boolean.TRUE);
                }
View Full Code Here

        inMessage = m;   
        incomingObserver = observer;
        continuations = cList;
        this.jmsListener = jmsListener;
        this.jmsConfig = jmsConfig;
        WorkQueueManager manager = bus.getExtension(WorkQueueManager.class);
        if (manager != null) {
            workQueue =  manager.getNamedWorkQueue("jms-continuation");
            if (workQueue == null) {
                workQueue = manager.getAutomaticWorkQueue();
            }
        } else {
            LOG.warning("ERROR_GETTING_WORK_QUEUE");
        }
    }
View Full Code Here

                    while (message != null) {
                        //REVISIT  to get the thread pool                       
                        //Executor executor = jmsDestination.callback.getExecutor();
                        Executor executor = null;
                        if (executor == null) {
                            WorkQueueManager wqm =
                                base.bus.getExtension(WorkQueueManager.class);
                            if (null != wqm) {
                                executor = wqm.getAutomaticWorkQueue();
                            }   
                        }
                        if (executor != null) {
                            try {
                                executor.execute(new JMSExecutor(message));
View Full Code Here

       
        if (executor == null || SynchronousExecutor.isA(executor)) {
            // need true asynchrony
            Bus bus = message.getExchange().get(Bus.class);
            if (bus != null) {
                WorkQueueManager workQueueManager =
                    bus.getExtension(WorkQueueManager.class);
                Executor autoWorkQueue =
                    workQueueManager.getAutomaticWorkQueue();
                executor = autoWorkQueue != null
                           ? autoWorkQueue
                           : OneShotAsyncExecutor.getInstance();
            } else {
                executor = OneShotAsyncExecutor.getInstance();
View Full Code Here

       
        if (executor == null || SynchronousExecutor.isA(executor)) {
            // need true asynchrony
            Bus bus = message.getExchange().get(Bus.class);
            if (bus != null) {
                WorkQueueManager workQueueManager =
                    bus.getExtension(WorkQueueManager.class);
                Executor autoWorkQueue =
                    workQueueManager.getNamedWorkQueue("ws-addressing");
                executor = autoWorkQueue != null
                           ? autoWorkQueue
                           :  workQueueManager.getAutomaticWorkQueue();
            } else {
                executor = OneShotAsyncExecutor.getInstance();
            }
        }
        message.getExchange().put(Executor.class, executor);
View Full Code Here

        public void run() {
            try {
                Executor executor = null;
                if (executor == null) {
                    WorkQueueManager wqm =
                        base.bus.getExtension(WorkQueueManager.class);
                    if (null != wqm) {
                        if (name != null) {
                            executor = wqm.getNamedWorkQueue("{" + name.getNamespaceURI() + "}"
                                                             + name.getLocalPart());
                        }                       
                        if (executor == null) {
                            executor = wqm.getNamedWorkQueue("jms");
                        }
                        if (executor == null) {
                            executor = wqm.getAutomaticWorkQueue();
                        }
                    }   
                }
                while (true) {
                    javax.jms.Message message = listenSession.consumer().receive();                  
View Full Code Here

                };
                HTTPClientPolicy policy = getClient(outMessage);
                try {
                    Executor ex = outMessage.getExchange().get(Executor.class);
                    if (ex == null) {
                        WorkQueueManager mgr = outMessage.getExchange().get(Bus.class)
                            .getExtension(WorkQueueManager.class);
                        AutomaticWorkQueue qu = mgr.getNamedWorkQueue("http-conduit");
                        if (qu == null) {
                            qu = mgr.getAutomaticWorkQueue();
                        }
                        long timeout = 5000;
                        if (policy != null && policy.isSetAsyncExecuteTimeout()) {
                            timeout = policy.getAsyncExecuteTimeout();
                        }
View Full Code Here

@Deprecated
public class WorkQueueSingleConfigTest {
    @Test
    public void testReadConfig() throws IOException, ConfigurationException {
        WorkQueueManager wqm = new WorkQueueManagerImpl();
        Assert.assertNull(wqm.getNamedWorkQueue("default"));
        ManagedWorkQueueList workQueueList = new ManagedWorkQueueList();
        WorkQueueSingleConfig wqlSingleConfig =
            new WorkQueueSingleConfig(workQueueList);
        InputStream is = this.getClass().getResourceAsStream("org.apache.cxf.workqueues.cfg");
        Properties properties = new Properties();
View Full Code Here

TOP

Related Classes of org.apache.cxf.workqueue.WorkQueueManager

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.