Examples of JMSServerManager


Examples of org.hornetq.jms.server.JMSServerManager

        }
    }

    /** {@inheritDoc} */
    public synchronized void stop(StopContext context) {
        final JMSServerManager jmsManager = jmsServer.getValue();
        try {
            jmsManager.removeQueueFromJNDI(queueName);
        } catch (Exception e) {
            MESSAGING_LOGGER.failedToDestroy(e, "queue", queueName);
        }
    }
View Full Code Here

Examples of org.hornetq.jms.server.JMSServerManager

        this.configuration = configuration;
    }

    /** {@inheritDoc} */
    public synchronized void start(StartContext context) throws StartException {
        final JMSServerManager jmsManager = jmsServer.getValue();
        try {
            WritableServiceBasedNamingStore.pushOwner(context.getChildTarget());
            try {
                jmsManager.createConnectionFactory(false, configuration, configuration.getBindings());
            } finally {
                WritableServiceBasedNamingStore.popOwner();
            }
        } catch (Exception e) {
            throw new StartException(MESSAGES.failedToCreate("connection-factory"), e);
View Full Code Here

Examples of org.hornetq.jms.server.JMSServerManager

        }
    }

    /** {@inheritDoc} */
    public synchronized void stop(StopContext context) {
        final JMSServerManager jmsManager = jmsServer.getValue();
        try {
            jmsManager.destroyConnectionFactory(name);
        } catch (Exception e) {
            MESSAGING_LOGGER.failedToDestroy("connection-factory", name);
        }
    }
View Full Code Here

Examples of org.hornetq.jms.server.JMSServerManager

        //
    }

    public synchronized void start(StartContext context) throws StartException {
        try {
            final JMSServerManager jmsServer = new JMSServerManagerImpl(hornetQServer.getValue(), new AS7BindingRegistry(context.getController().getServiceContainer()));

            try {
                // FIXME - we also need the TCCL here in case the JMSServerManager starts the HornetQServer
                final ClassLoader loader = getClass().getClassLoader();
                SecurityActions.setContextClassLoader(loader);
                jmsServer.start();

                // FIXME - this check is a work-around for AS7-3658
                if (!hornetQServer.getValue().getConfiguration().isBackup()) {
                    hornetQServer.getValue().getRemotingService().allowInvmSecurityOverride(new HornetQPrincipal(HornetQDefaultCredentials.getUsername(), HornetQDefaultCredentials.getPassword()));
                }
View Full Code Here

Examples of org.hornetq.jms.server.JMSServerManager

            throw new StartException(e);
        }
    }

    public synchronized void stop(StopContext context) {
        final JMSServerManager jmsServer = this.jmsServer;
        this.jmsServer = null;
        try {
            jmsServer.stop();
        } catch (Exception e) {
            MESSAGING_LOGGER.errorStoppingJmsServer(e);
        }
    }
View Full Code Here

Examples of org.hornetq.jms.server.JMSServerManager

            MESSAGING_LOGGER.errorStoppingJmsServer(e);
        }
    }

    public synchronized JMSServerManager getValue() throws IllegalStateException {
        final JMSServerManager jmsServer = this.jmsServer;
        if(jmsServer == null) {
            throw new IllegalStateException();
        }
        return jmsServer;
    }
View Full Code Here

Examples of org.hornetq.jms.server.JMSServerManager

        this.jndi = jndi;
    }

    /** {@inheritDoc} */
    public synchronized void start(StartContext context) throws StartException {
        final JMSServerManager jmsManager = jmsServer.getValue();
        try {
            jmsManager.createTopic(false, name, jndi);
        } catch (Exception e) {
            throw new StartException(MESSAGES.failedToCreate("queue"), e);
        }
    }
View Full Code Here

Examples of org.hornetq.jms.server.JMSServerManager

        }
    }

    /** {@inheritDoc} */
    public synchronized void stop(StopContext context) {
        final JMSServerManager jmsManager = jmsServer.getValue();
        try {
            jmsManager.removeTopicFromJNDI(name);
        } catch (Exception e) {
            MESSAGING_LOGGER.failedToDestroy(e, "jms topic", name);
        }
    }
View Full Code Here

Examples of org.hornetq.jms.server.JMSServerManager

    /** {@inheritDoc} */
    public synchronized void start(final StartContext context) throws StartException {
        context.asynchronous();

        final JMSServerManager jmsManager = jmsServer.getValue();
        executorInjector.getValue().execute(new Runnable() {
            @Override
            public void run() {
                try {
                    jmsManager.createQueue(false, queueName, selectorString, durable, jndi);
                    context.complete();
                } catch (Throwable e) {
                    context.failed(MESSAGES.failedToCreate(e, "queue"));
                }
            }
View Full Code Here

Examples of org.hornetq.jms.server.JMSServerManager

    /** {@inheritDoc} */
    public synchronized void stop(final StopContext context) {
        // JMS Server Manager uses locking which waits on service completion, use async to prevent starvation
        context.asynchronous();

        final JMSServerManager jmsManager = jmsServer.getValue();
        executorInjector.getValue().execute(new Runnable() {
            @Override
            public void run() {
                try {
                    jmsManager.removeQueueFromJNDI(queueName);
                } catch (Throwable e) {
                    MESSAGING_LOGGER.failedToDestroy(e, "queue", queueName);
                }
                context.complete();
            }
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.