All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.mats3.spring.jms.factories.ConnectionFactoryWithStartStopWrapper Maven / Gradle / Ivy

Go to download

Mats^3 Spring tooling for the Mats^3 JMS implementation, including an implementation of JmsMatsTransactionManager using Spring's PlatformTransactionManager, and tooling for configuring a MatsFactory for different scenarios: development, staging, production.

The newest version!
package io.mats3.spring.jms.factories;

import javax.jms.ConnectionFactory;

import io.mats3.util.wrappers.ConnectionFactoryWrapper;

/**
 * A abstract {@link ConnectionFactoryWrapper} recognized by {@link ScenarioConnectionFactoryProducer}, which has a
 * start() and stop() method, which can be used if you need to fire up a local MQ Broker: This class is meant to be
 * extended to provide such functionality.
 *
 * @author Endre Stølsvik 2019-06-12 00:26 - http://stolsvik.com/, [email protected]
 */
public abstract class ConnectionFactoryWithStartStopWrapper extends ConnectionFactoryWrapper {
    /**
     * Start whatever is needed to support the ConnectionFactory, i.e. a localVm MQ Broker. If you return a
     * {@link ConnectionFactory}, this will be set on the wrapper using {@link #setWrappee(ConnectionFactory)}. If you
     * return null, nothing will be done - implying that you need to do that setting.
     */
    public abstract ConnectionFactory start(String beanName) throws Exception;

    /**
     * Stop whatever you started in {@link #start(String)}.
     */
    public abstract void stop() throws Exception;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy