1 19 20 package org.apache.cayenne.event; 21 22 import java.util.Collection ; 23 import java.util.Map ; 24 25 31 public class JMSBridgeFactory implements EventBridgeFactory { 32 33 public static final String TOPIC_CONNECTION_FACTORY_DEFAULT = "JmsTopicConnectionFactory"; 36 37 public static final String TOPIC_CONNECTION_FACTORY_PROPERTY = "cayenne.JMSBridge.topic.connection.factory"; 38 39 42 public EventBridge createEventBridge(Collection localSubjects, String externalSubject, Map properties) { 43 JMSBridge bridge = new JMSBridge(localSubjects, externalSubject); 44 45 String topicConnectionFactory = (String ) properties 47 .get(TOPIC_CONNECTION_FACTORY_PROPERTY); 48 49 bridge.setTopicConnectionFactoryName(topicConnectionFactory != null 50 ? topicConnectionFactory 51 : TOPIC_CONNECTION_FACTORY_DEFAULT); 52 53 return bridge; 54 } 55 } 56 | Popular Tags |