What is the difference between these two given the following client code
public void setupPubSub()
throws JMSException, NamingException
InitialContext iniCtx = new InitialContext();
Object tmp = iniCtx.lookup("ConnectionFactory");
TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;
conn = tcf.createTopicConnection();
topic = (Topic) iniCtx.lookup("topic/testTopic");
session = conn.createTopicSession(false,
What would happen if I were to change the coloured text to "RMIConnectionFactory". Is it possible? What are the implications of such a change with repect to security/transaction handling /or other aspects provided by JBoss server?
The RMIConnectionFactory uses RMI
ConnectionFactory uses OIL which is plain sockets.
The RMI version is slower but can be more robust in some circumstances.