Search in sources :

Example 1 with SimpleString

use of org.apache.activemq.artemis.api.core.SimpleString in project wildfly by wildfly.

the class QueueService method start.

/** {@inheritDoc} */
@Override
public synchronized void start(StartContext context) throws StartException {
    try {
        final ActiveMQServer server = this.activeMQServer.getValue();
        server.deployQueue(new SimpleString(queueConfiguration.getAddress()), new SimpleString(queueConfiguration.getName()), SimpleString.toSimpleString(queueConfiguration.getFilterString()), queueConfiguration.isDurable(), temporary);
    } catch (Exception e) {
        throw new StartException(e);
    }
}
Also used : ActiveMQServer(org.apache.activemq.artemis.core.server.ActiveMQServer) SimpleString(org.apache.activemq.artemis.api.core.SimpleString) StartException(org.jboss.msc.service.StartException) StartException(org.jboss.msc.service.StartException)

Example 2 with SimpleString

use of org.apache.activemq.artemis.api.core.SimpleString in project wildfly by wildfly.

the class QueueService method stop.

/** {@inheritDoc} */
@Override
public synchronized void stop(StopContext context) {
    try {
        final ActiveMQServer server = this.activeMQServer.getValue();
        server.destroyQueue(new SimpleString(queueConfiguration.getName()), null, false);
    } catch (Exception e) {
        MessagingLogger.ROOT_LOGGER.failedToDestroy("queue", queueConfiguration.getName());
    }
}
Also used : ActiveMQServer(org.apache.activemq.artemis.core.server.ActiveMQServer) SimpleString(org.apache.activemq.artemis.api.core.SimpleString) StartException(org.jboss.msc.service.StartException)

Aggregations

SimpleString (org.apache.activemq.artemis.api.core.SimpleString)2 ActiveMQServer (org.apache.activemq.artemis.core.server.ActiveMQServer)2 StartException (org.jboss.msc.service.StartException)2