#117 New topic with dots cannot be added via JmsAdminServerIfc

server (49)
Mark Priest

Topics with dots (i.e. "my.topic") can be added to an
OpenJMS server using the openjms.xml configuration file
and are accessible via JNDI. However, topics with dots
cannot be added using the JmsAdminServerIfc
administrative interface and then be accessed via JNDI.

Steps to recreate the problem:

1. Add the topic with dots programmatically as follows:

String topic = "my.topic";
Boolean isQueue = Boolean.FALSE;
if (!admin.addDestination(topic, isQueue)) {
System.err.println("Failed to create topic " +

2. Method returns sucessfully
3. New topic is visible in admin GUI
4. Topic creation is logged in JMS server
5. Attempt to access the new topic via JNDI as follows:

Topic topic = (Topic) context.lookup("mytopic");

6. javax.naming.NamingException is thrown indicating no
such topic is bound in JNDI.


  • Mark Priest

    Mark Priest - 2004-12-02

    Logged In: YES

    Oops, step 5 should be:

    Topic topic = (Topic) context.lookup("my.topic");

  • Tim Anderson

    Tim Anderson - 2005-02-16

    Logged In: YES

    Topics with embedded dots are treated as heirarchical topics,
    for use by wildcarded subscribers, and are bound in JNDI
    such that each element but the last is a new subcontext.
    So topic "a.b.c" will create subcontext "a", with a child
    subcontext "b", with the topic "c" as a child of "b".

    So how do you look this up in JNDI? For the embedded JNDI
    provider it would be:

    Topic topic = (Topic) context.lookup("a/b/c");

    the "/" indicates the path separator.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks