1 56 package org.objectstyle.cayenne.event; 57 58 import java.util.Map ; 59 60 66 public class JMSBridgeFactory implements EventBridgeFactory { 67 68 public static final String TOPIC_CONNECTION_FACTORY_DEFAULT = 71 "JmsTopicConnectionFactory"; 72 73 public static final String TOPIC_CONNECTION_FACTORY_PROPERTY = 74 "cayenne.JMSBridge.topic.connection.factory"; 75 76 public JMSBridgeFactory() { 77 super(); 78 } 80 81 public EventBridge createEventBridge(EventSubject localSubject, Map properties) { 82 JMSBridge bridge = 83 new JMSBridge( 84 localSubject, 85 EventBridge.convertToExternalSubject(localSubject)); 86 87 String topicConnectionFactory = 89 (String ) properties.get(TOPIC_CONNECTION_FACTORY_PROPERTY); 90 91 bridge.setTopicConnectionFactoryName( 92 topicConnectionFactory != null 93 ? topicConnectionFactory 94 : TOPIC_CONNECTION_FACTORY_DEFAULT); 95 96 return bridge; 97 } 98 99 } 100 | Popular Tags |