|
View:
New views
10 Messages
—
Rating Filter:
Alert me
|
|
|
Spaces in Topic NamesHello Again -
I need to connect to some topics on a Weblogic 10 server. Here's the problem, the topic names have spaces in them. In my config file, I specify jms:// My Topic and I get an error stating that jms:// My%20Topic was not found in the JNDI lookup. I don't have any control over the topic names on the remote server. Any suggestions? BTW, I also tried putting in a and I got parse error at startup. Thanks - Mark |
|
|
Re: Spaces in Topic Names BTW - I used the UTF-8 version of space (# 32;) and got the same problem. Mule just changes the spaces to %20.
Does anyone have a workaround for this? Thanks - Mark |
|
|
Re: Spaces in Topic NamesThis is a very odd naming scheme. I'd find out what Weblogic recommends doing with such names and use the same escape char in Mule.
HTH, Andrew On Mon, Nov 9, 2009 at 2:11 PM, Mark Baker <mark.a.baker@...> wrote:
|
|
|
Re: Spaces in Topic NamesYou're right, this is an odd naming scheme, but I'm just connecting to another server an I have no control over their topic names. More generally, isn't this a bug in Mule? The JNDI interface takes a String (or Name) for the lookup method, not an URI. So isn't this really a problem with how Mule is doing the lookup? Mark |
|
|
Re: Spaces in Topic NamesMule will pass destination name as is, however every broker may have special handling for non-alphadigits (e.g. dot is typically a special one). Did you look it up ok from a standalone test?
Andrew
On Tue, Nov 10, 2009 at 12:48 PM, Mark Baker <mark.a.baker@...> wrote:
|
|
|
Re: Spaces in Topic NamesHi Andrew -
I am able to look it up from a standalone (non Mule) test. I just use the topic name with the spaces and it works fine. I've dug into the code and here's where I believe the problem is: In Jms11Support.java: public Destination createDestination(Session session, ImmutableEndpoint endpoint) throws JMSException { String address = endpoint.getEndpointURI().toString(); ........ So you're using the endpoint URI for the address. Then, in the MuleEndpointURI constructor: public MuleEndpointURI(String uri) throws EndpointException { uri = uri.trim().replaceAll(" ", "%20"); //Allow Expressions to be embedded uri = uri.replaceAll("\\{", "\\["); uri = uri.replaceAll("\\}", "\\]"); ....... In the first line, you replace all spaces with %20. So in my case, my "jms://my Topic" endpoint gets turned into the "jms://my%20Topic" URI by the MuleEndpointURI constructor. Then the Jms11Support code uses the exact String "my%20Topic" for the JNDI lookup, which correctly fails on the Weblogic server. Thanks - Mark |
|
|
Re: Spaces in Topic NamesAs a quick workaround you can override the connector to return a custom support subclass 'undoing' the conversion.
HTH, Andrew On Tue, Nov 10, 2009 at 3:56 PM, Mark Baker <mark.a.baker@...> wrote:
|
|
|
Re: Spaces in Topic NamesThanks for that idea. I was trying not to alter the source for the workaround so the custom connector / custom JmsSupport classes should work well.
Thanks again - Mark |
|
|
Re: Spaces in Topic NamesMark,
It would be great to also capture this in a Jira issue, so a fix can be considered for a future release: http://www.mulesoft.org/jira Bonus points for attaching a test case :-) On Tue, Nov 10, 2009 at 2:04 PM, Mark Baker <mark.a.baker@...> wrote:
|
|
|
Re: Spaces in Topic NamesDon't treat it as modifying. Mule has been created from the grounds up to be extendable and tweakable, so here you go.
HTH, Andrew |
| Free embeddable forum powered by Nabble | Forum Help |