TopicConnectionFactory topicConnectionFactory =
I have the same problem, I tried using this line and I get back null, what is the reason?
Is it possible to create your own QueueConnectionFactory or TopicConnectionFactory ? If so, how do you do it ?
This could have several reasons:
1) you use the wrong JNDI server
2) you use the minimal configuration
3) in your jbossmq-service.xml there is no "ConnectionFactoryJNDIRef" attribute with the value of "ConnectionFactory".
Not that any connection factory implements the Topic as well as the Queue Connection Factory and can be casted to any of them.
To change the JNDI names just look into the jbossmq-service.xml file and change "ConnectionFactoryJNDIRef" or "XAConnectionFactoryJNDIRef" attribute.
Note that it is not easy to create your own implementation of a connection factory because you also have to implement the ServerILService etc. meaning the way the messages are sent over the wire.