MotechCachingConnectionFactory

public class MotechCachingConnectionFactory extends CachingConnectionFactory

Represents an extension of the CachingConnectionFactory that adds username and password support, in case the JMS broker is secured.

Methods

doCreateConnection

protected Connection doCreateConnection()

Creates a connection with the username and password if both not blank, otherwise without them.

setBrokerUrl

public void setBrokerUrl(String brokerURL)

Sets the brokerURL of the ActiveMQ only when the TargetConnectionFactory is instanceof ActiveMQConnectionFactory.

Parameters:
  • brokerURL – the brokerURL of the ActiveMQ

setPassword

public void setPassword(String password)

Sets the password.

Parameters:
  • password – the password of ActiveMQ

setUsername

public void setUsername(String username)

Sets the username.

Parameters:
  • username – the name of an user