Package org.objectweb.joram.mom.dest.jms
Class JMSDistribution
- java.lang.Object
-
- org.objectweb.joram.mom.dest.jms.JMSDistribution
-
- All Implemented Interfaces:
DistributionHandler
public class JMSDistribution extends Object implements DistributionHandler
Distribution handler for the JMS distribution bridge.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classJMSDistribution.SessionAndProducer
-
Field Summary
Fields Modifier and Type Field Description private List<String>connectionNamesprivate static booleanDEBUGprivate static StringDESTINATION_NAME_PROPprivate StringdestNameDestination JNDI name.private longlastUpdate(package private) longlastwarnprivate static Loggerloggerprivate static StringROUTING_PROPprivate LinkedHashMap<String,JMSDistribution.SessionAndProducer>sessionsprivate static StringUPDATE_PERIOD_PROPprivate longupdatePeriod
-
Constructor Summary
Constructors Constructor Description JMSDistribution()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the JMS distribution module and all associated resources.voiddistribute(Message message)Distributes the given message outside of the JORAM server.voidinit(Properties properties, boolean firstTime)Configures the handler with the given properties.
-
-
-
Field Detail
-
logger
private static final Logger logger
-
DEBUG
private static final boolean DEBUG
-
DESTINATION_NAME_PROP
private static final String DESTINATION_NAME_PROP
- See Also:
- Constant Field Values
-
UPDATE_PERIOD_PROP
private static final String UPDATE_PERIOD_PROP
- See Also:
- Constant Field Values
-
ROUTING_PROP
private static final String ROUTING_PROP
- See Also:
- Constant Field Values
-
sessions
private LinkedHashMap<String,JMSDistribution.SessionAndProducer> sessions
-
destName
private String destName
Destination JNDI name.
-
lastUpdate
private long lastUpdate
-
updatePeriod
private long updatePeriod
-
lastwarn
long lastwarn
-
-
Method Detail
-
init
public void init(Properties properties, boolean firstTime)
Description copied from interface:DistributionHandlerConfigures the handler with the given properties.- Specified by:
initin interfaceDistributionHandler- Parameters:
properties- The initial set of properties.
-
distribute
public void distribute(Message message) throws Exception
Description copied from interface:DistributionHandlerDistributes the given message outside of the JORAM server.- Specified by:
distributein interfaceDistributionHandler- Parameters:
message- the message to distribute- Throws:
Exception- if the message could not be distributed. The message will be forwarded to a DMQ, if any.
-
close
public void close()
Closes the JMS distribution module and all associated resources. Called by generic behavior during the destination finalization.- Specified by:
closein interfaceDistributionHandler
-
-