2 Replies Latest reply on Oct 2, 2002 8:45 AM by Adrian Brock

    JNDI and JMS ConnectionFactory

    Ian Wehrman Newbie

      hello all,
      i was wondering if someone could help me understand what's going on "behind the scenes" with ConnectionFactories being bound to JNDI contexts. what confused me initially were the JMS examples in the JBoss-3 AdminDevel paid documentation. in both the p2p and pub/sub examples, things get started off with jndi lookups for "ConnectionFactory." this object is then cast either into a TopicConnectionFactory or a QueueConnectionFactory. i don't understand how this object can be cast into either kind of factory, seemingly arbitrarily. i've looked through jms-service.xml and jbossmq-service.xml files, and see that both TopicConnectionFactory and QueueConnectionFactory objects are bound to the same jndi name, ConnectionFactory - but how does the client code know which object it's getting?

      thanks in advance for helping me grasp this...