Package io.mats3.spring.jms.factories
package io.mats3.spring.jms.factories
Tooling for handling your application's configuration of a JMS
ConnectionFactory
in different scenarios (development, testing, staging, production) - best explained in the class doc of
ScenarioConnectionFactoryProducer
- do
note that this should not be the first thing you delve into when trying out Mats!-
ClassDescriptionConfigurable
ScenarioConnectionFactoryWrapper.ScenarioDecider
, whose defaults implements the logic described inScenarioConnectionFactoryProducer
and handles all the Spring Profiles specified inMatsProfiles
.An implementation of this interface can decide whether a specific Mats Scenario is active.Standard implementation ofConfigurableScenarioDecider.SpecificScenarioDecider
used in the default configuration ofConfigurableScenarioDecider
, which takes a set of profile-or-properties names and checks whether they are present as a Spring Profile, or (with the "-" replaced by ".") whether it exists as a property in the Spring Environment.A abstractConnectionFactoryWrapper
recognized byScenarioConnectionFactoryProducer
, 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.Specifies Spring Profiles (and also which Spring Environment variables) that are relevant for Mats when used with conjunction withScenarioConnectionFactoryProducer
and the default configuration ofConfigurableScenarioDecider
.The three different Mats Scenarios that theScenarioConnectionFactoryWrapper
juggles between based on the results of a set of threeScenarioConnectionFactoryWrapper.ScenarioDecider
s, with an optional default choice.Provides a factory for a Spring-integrated Wrapper/Facade around a JMS ConnectionFactory, which in addition to supporting the production setup, also facilitates the development situation where you often want to run against either an in-vm MQ Broker or against a MQ Broker running on localhost, and also integrates with the "mats-spring-test" integration test library where when run with theMatsTestProfile
you will most probably want an in-vm setup (typically mocking up the project-external Mats endpoints that the tested endpoints collaborate with).AConnectionFactoryWrapper
which lazily decides which of the threeMatsScenario
s are active, and produces the wrapper-targetConnectionFactory
based on that - you most probably want to useScenarioConnectionFactoryProducer
to make an instance of this class, but you can configure it directly too.A ConnectionFactory provider which can throw Exceptions - if it returns aConnectionFactoryWithStartStopWrapper
, start() and stop() will be invoked on that, read more on its JavaDoc.We need a way to decide between the three differentMatsScenario
s.Provides an easy way to get hold of the most probableJmsMatsFactory
transaction manager configuration in the Spring world (usingJmsMatsTransactionManager_JmsAndSpringManagedSqlTx
, or only theJmsMatsTransactionManager_Jms
if no DataSource is needed).Wrapper that should be used for a JmsMatsFactory in a Spring context.