Menu

#128 Can't have duplicate topic/queue/connectionfactory names

open
nobody
jndi (13)
5
2005-03-02
2005-03-02
Bas Ven
No

The server doesn't check for duplicate queue, topic, or
connection factory names, so the last one to be bound
in JNDI wins.

Example:
If you create a topic of name
"JmsTopicConnectionFactory" you will get a class cast
exception when running the following code:

String factoryName = "JmsTopicConnectionFactory";
TopicConnectionFactory factory =
(TopicConnectionFactory)context.lookup
(factoryName);

The object returned is the JmsTopic and not the
connectionfactory.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB