Examples of JmsDestination


Examples of org.apache.cxf.transport.jms.JMSDestination

     * {@inheritDoc}
     */
    public Destination getDestination(EndpointInfo endpointInfo) throws IOException {
        JMSOldConfigHolder old = new JMSOldConfigHolder();
        JMSConfiguration jmsConf = old.createJMSConfigurationFromEndpointInfo(bus, endpointInfo, null, false);
        return new JMSDestination(bus, endpointInfo, jmsConf);
    }
View Full Code Here

Examples of org.exolab.jms.client.JmsDestination

    private void add(Consumer consumer, Subscription subscription)
            throws JMSException, PersistenceException {

        String name = consumer.getName();
        JmsDestination destination = subscription.getDestination();
        Iterator iterator = subscription.getMessages().iterator();
        PersistenceAdapter adapter = _database.getAdapter();
        Connection connection = _database.getConnection();

        if (!consumer.isQueueConsumer()) {
            adapter.addDurableConsumer(connection, destination.getName(), name);

        }

        while (iterator.hasNext()) {
            MessageState state = (MessageState) iterator.next();
View Full Code Here

Examples of org.exolab.jms.client.JmsDestination

            throw new ServiceException("Failed to get destinations",
                                       exception);
        }

        for (Iterator i = destinations.iterator(); i.hasNext();) {
            JmsDestination destination = (JmsDestination) i.next();
            if (destination.getPersistent()) {
                try {
                    ContextHelper.rebind(context, destination.getName(),
                                         destination);
                } catch (NamingException exception) {
                    throw new ServiceException("Failed to add destination "
                                               + destination.getName()
                                               + " to JNDI", exception);
                }
            }
        }
View Full Code Here

Examples of org.exolab.jms.client.JmsDestination

    // implementation of PersistenceAdapter.addDestination
    public void addDestination(Connection connection, String name,
                               boolean queue)
            throws PersistenceException {

        JmsDestination destination = (queue)
                ? (JmsDestination) new JmsQueue(name)
                : (JmsDestination) new JmsTopic(name);

        // create the destination. If the destination is also
        // a queue create a special consumer for it.
View Full Code Here

Examples of org.exolab.jms.client.JmsDestination

    // implementation of PersistenceAdapter.removeDestination
    public void removeDestination(Connection connection, String name)
            throws PersistenceException {

        JmsDestination destination = _destinations.get(name);
        if (destination != null) {
            try {
                _destinationLock.writeLock().acquire();
                _destinations.remove(connection, destination);
            } catch (InterruptedException exception) {
View Full Code Here

Examples of org.exolab.jms.client.JmsDestination

     */
    public void importCollection(StoreIterator iterator) throws JMSException,
            PersistenceException {
        Connection connection = _database.getConnection();
        while (iterator.hasNext()) {
            JmsDestination destination = (JmsDestination) iterator.next();
            String name = destination.getName();
            boolean queue = false;
            if (destination instanceof JmsQueue) {
                queue = true;
            }

View Full Code Here

Examples of org.exolab.jms.client.JmsDestination

     */
    public synchronized void add(Connection connection, String dest,
                                 String consumer)
            throws PersistenceException {

        JmsDestination destination = null;
        long destinationId = 0;

        synchronized (_destinations) {
            destination = _destinations.get(dest);
            if (destination == null) {
View Full Code Here

Examples of org.exolab.jms.client.JmsDestination

        HashMap result = new HashMap();

        Iterator iter = _consumers.values().iterator();
        while (iter.hasNext()) {
            Consumer map = (Consumer) iter.next();
            JmsDestination dest = _destinations.get(map.destinationId);

            if (dest instanceof JmsTopic) {
                result.put(map.name, dest.getName());
            }
        }

        return result;
    }
View Full Code Here

Examples of org.exolab.jms.client.JmsDestination

            // iterate through the result set and construct the corresponding
            // MessageHandles
            set = select.executeQuery();
            while (set.next()) {
                // Attempt to retrieve the corresponding destination
                JmsDestination dest = _destinations.get(set.getLong(2));
                if (dest == null) {
                    throw new PersistenceException(
                        "Cannot create persistent handle, because " +
                        "destination mapping failed for " + set.getLong(2));
                }
View Full Code Here

Examples of org.exolab.jms.client.JmsDestination

        destinations = _database.getAdapter().getAllDestinations(connection);

        HashMap consumers = new HashMap();

        while (destinations.hasMoreElements()) {
            JmsDestination destination =
                    (JmsDestination) destinations.nextElement();
            if (destination instanceof JmsTopic) {
                Enumeration names = _database.getAdapter().getDurableConsumers(
                        connection, destination.getName());
                while (names.hasMoreElements()) {
                    String name = (String) names.nextElement();
                    Consumer consumer = (Consumer) consumers.get(name);
                    if (consumer == null) {
                        consumer = new Consumer(name, null);
                        consumers.put(name, consumer);
                    }
                    Subscription subscription = getSubscription(name,
                                                                destination);
                    consumer.addSubscription(subscription);
                }
            } else {
                final String name = destination.getName();
                Consumer consumer = (Consumer) consumers.get(name);
                if (consumer == null) {
                    consumer = new Consumer((JmsQueue) destination);
                    consumers.put(name, consumer);
                }
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.