messaging-activemq/src/main/java/org/wildfly/extension/messaging/activemq/jms/ConnectionFactoryService.java
public synchronized void stop(final StopContext context) {
        final JMSServerManager jmsManager = jmsServer.getValue();
        final Runnable task = new Runnable() {
            @Override
            public void run() {
                try {
                    jmsManager.destroyConnectionFactory(name);
                } catch (Throwable e) {
                    MessagingLogger.ROOT_LOGGER.failedToDestroy("connection-factory", name);
                }
                context.complete();
            }
        };
        // JMS Server Manager uses locking which waits on service completion, use async to prevent starvation
        try {
            executorInjector.getValue().execute(task);
        } catch (RejectedExecutionException e) {
            task.run();
        } finally {
            context.asynchronous();
        }
    }
public synchronized void stop(final StopContext context) {
        final JMSServerManager jmsManager = jmsServer.getValue();
        final Runnable task = new Runnable() {
            @Override
            public void run() {
                try {
                    jmsManager.destroyConnectionFactory(name);
                } catch (Throwable e) {
                    MessagingLogger.ROOT_LOGGER.failedToDestroy("connection-factory", name);
                }
                context.complete();
            }
        };
        // JMS Server Manager uses locking which waits on service completion, use async to prevent starvation
        try {
            executorInjector.getValue().execute(task);
        } catch (RejectedExecutionException e) {
            task.run();
        } finally {
            context.asynchronous();
        }
    }
public synchronized void stop ( final StopContext context ) { final JMSServerManager jmsManager = jmsServer . getValue ( ) ; final Runnable task = new Runnable ( ) { @ Override public void run ( ) { try { jmsManager . destroyConnectionFactory ( name ) ; } catch ( Throwable e ) { MessagingLogger . ROOT_LOGGER . failedToDestroy ( "connection-factory" , name ) ; } context . complete ( ) ; } } ; // JMS Server Manager uses locking which waits on service completion, use async to prevent starvation try { executorInjector . getValue ( ) . execute ( task ) ; } catch ( RejectedExecutionException e ) { task . run ( ) ; } finally { context . asynchronous ( ) ; } }
{@inheritDoc}
{