Discussion:
[openjms-developer] [ openjms-Bugs-1077649 ] New topic with dots cannot be added via JmsAdminServerIfc
SourceForge.net
2005-02-16 12:19:10 UTC
Permalink
Bugs item #1077649, was opened at 2004-12-03 02:30
Message generated for change (Comment added) made by tanderson
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=1077649&group_id=54559

Category: server
Group: v0.7.6.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Mark Priest (mpriest)
Assigned to: Nobody/Anonymous (nobody)
Summary: New topic with dots cannot be added via JmsAdminServerIfc

Initial Comment:
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 " +
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.


----------------------------------------------------------------------
Comment By: Tim Anderson (tanderson)
Date: 2005-02-16 23:19

Message:
Logged In: YES
user_id=557161

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.


----------------------------------------------------------------------

Comment By: Mark Priest (mpriest)
Date: 2004-12-03 06:02

Message:
Logged In: YES
user_id=699376

Oops, step 5 should be:

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

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=1077649&group_id=54559
Loading...