String protocol = getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.COORDINATION_PROTOCOL, m, this.session);
if (protocol != null) {
RemoteCommandManager rcm = new RemoteCommandManager(this.session);
if (protocol.equalsIgnoreCase(CacheCoordinationProtocol.JMS) || protocol.equalsIgnoreCase(CacheCoordinationProtocol.JMSPublishing)) {
JMSPublishingTransportManager transport = null;
if (protocol.equalsIgnoreCase(CacheCoordinationProtocol.JMS)){
transport = new JMSTopicTransportManager(rcm);
} else {
transport = new JMSPublishingTransportManager(rcm);
}
rcm.setTransportManager(transport);
String host = getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.COORDINATION_JMS_HOST, m, this.session);
if (host != null) {
transport.setTopicHostUrl(host);
}
String topic = getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.COORDINATION_JMS_TOPIC, m, this.session);
if (topic != null) {
transport.setTopicName(topic);
}
String factory = getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.COORDINATION_JMS_FACTORY, m, this.session);
if (factory != null) {
transport.setTopicConnectionFactoryName(factory);
}
String reuse_publisher = getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.COORDINATION_JMS_REUSE_PUBLISHER, m, this.session);
if (reuse_publisher != null) {
transport.setShouldReuseJMSTopicPublisher(reuse_publisher.equalsIgnoreCase("true"));
}
} else if (protocol.equalsIgnoreCase(CacheCoordinationProtocol.RMI) || protocol.equalsIgnoreCase(CacheCoordinationProtocol.RMIIIOP)) {
if (protocol.equalsIgnoreCase(CacheCoordinationProtocol.RMIIIOP)){
((RMITransportManager)rcm.getTransportManager()).setIsRMIOverIIOP(true);