[
http://jira.jboss.com/jira/browse/JBMESSAGING-1229?page=all ]
Tim Fox closed JBMESSAGING-1229.
--------------------------------
Resolution: Rejected
There is an attribute jndi-name which determines the place in jndi the queue goes
Allow names for queues and topics to contain slashes
----------------------------------------------------
Key: JBMESSAGING-1229
URL:
http://jira.jboss.com/jira/browse/JBMESSAGING-1229
Project: JBoss Messaging
Issue Type: Feature Request
Components: JMS Destination Manager
Affects Versions: 1.4.0.SP3
Environment: JBoss Messaging 1.4.0.SP3 on JBoss AS 4.2.2.GA
Reporter: Martin Landua
Assigned To: Tim Fox
Priority: Minor
When defining a queue or topic, the JNDI name is automatically derived from the
queue/topic's name. It is often convenient for JNDI names to contain slashes to form a
queue/topic hierarchy. However, the JMX-name of a queue/topic must not contain slashes
because in this case the automatic registration in JNDI fails due to missing parent
contexts.
Please consider the enclosed patch that would fix this problem. The patch renders
everything backward compatible.
Index:
D:/JBossIDE/workspace_jb42/jboss-messaging-1.4.0.SP3a/src/main/org/jboss/jms/server/DestinationJNDIMapper.java
===================================================================
---
D:/JBossIDE/workspace_jb42/jboss-messaging-1.4.0.SP3a/src/main/org/jboss/jms/server/DestinationJNDIMapper.java (revision
3658)
+++
D:/JBossIDE/workspace_jb42/jboss-messaging-1.4.0.SP3a/src/main/org/jboss/jms/server/DestinationJNDIMapper.java (working
copy)
@@ -99,20 +99,18 @@
jndiNameInContext = destination.getName();
jndiName = parentContext + "/" + jndiNameInContext;
}
- else
- {
- // TODO more solid parsing + test cases
- int sepIndex = jndiName.lastIndexOf('/');
- if (sepIndex == -1)
- {
- parentContext = "";
- }
- else
- {
- parentContext = jndiName.substring(0, sepIndex);
- }
- jndiNameInContext = jndiName.substring(sepIndex + 1);
- }
+
+ // TODO more solid parsing + test cases
+ int sepIndex = jndiName.lastIndexOf('/');
+ if (sepIndex == -1)
+ {
+ parentContext = "";
+ }
+ else
+ {
+ parentContext = jndiName.substring(0, sepIndex);
+ }
+ jndiNameInContext = jndiName.substring(sepIndex + 1);
destination.setJndiName(jndiName);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira