]
Dimitris Andreadis updated JBAS-1908:
-------------------------------------
Fix Version/s: JBoss-4.2.1.CR1
(was: JBossAS-4.2.0.CR1)
reschedule
listMessageCounter issue with JMS subscriptions containing certain
message selector characters
----------------------------------------------------------------------------------------------
Key: JBAS-1908
URL:
http://jira.jboss.com/jira/browse/JBAS-1908
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: JMS service
Affects Versions: JBossAS-4.0.2 Final
Environment: Windows XP Professional, JDK1.4.2_06, JBoss 4.0.2
Reporter: Jaco Joubert
Priority: Minor
Fix For: JBoss-4.2.1.CR1
Attachments: DestinationManager.txt, DestinationMBeanSupport.txt,
listCounter.jar, MessageCounter.txt, test-topic-service.xml
When the message selector query for a subscription to a JMS topic looks someting like
"field in ('A', 'B', 'C')", two failures occur on JMS
MBeans:
1. The listMessageCounter operation on jboss.mq:service=DestinationManager fails with a
NumberFormatException:
Caused by: java.lang.NumberFormatException: For input string: " 'ghi'"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:468)
at java.lang.Integer.parseInt(Integer.java:518)
at
org.jboss.mq.server.jmx.DestinationManager.listMessageCounter(DestinationManager.java:477)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
... 44 more
This is because the getCounterAsString() method is used on the MessageCounter to get the
details and then traversed with
a StringTokenizer tokenizing on commas, but the subscription name also contains commas in
this case.
2. The listMessageCounter operation on
jboss.mq.destination:name=[topicName],service=Topic works, but the resulting HTML
table has some of the selector values populating the counter columns. The problem is
because of the same issue as above.
This can be reproduced by following these steps:
1. Startup a JBoss4.0.2 with default configuration.
2. Deploy the attached 'test-topic-service.xml'. This will create a JMS topic
called 'counterTestTopic'.
3. Run the attached client (source included in jar). The only jar needed on classpath
is the 'jbossall-client.jar':
java -cp "[path]\jbossall-client.jar;.\listCounter.jar"
za.co.jdj.jbossmq.testcounter.TestListCounter
This will do the following:
3.1. Connect to the JMS server running locally.
3.2. Create a publisher and durable subscriber on the 'counterTestTopic'
already deployed.
The subscriber has a message selector in the format already described
3.3. Invoke the listMessageCounter operation on jboss.mq:service=DestinationManager,
printing the error.
3.4. Wait for the client to look at the html table created by the topic in a
browser.
3.5. Remove the subscription and exit.
Suggested fixes for the problem includes:
1. Add a getDestinationTypeDescription() method to org.jboss.mq.server.MessageCounter.
(See MessageCounter.txt attached)
2. Change the listMessageCounter method on org.jboss.mq.server.jmx.DestinationManager to
not use the getCounterAsString() method
on org.jboss.mq.server.MessageCounter, but rather extract the values itself for the
html table.
(See the DestinationManager.txt file attached).
3. Change the listMessageCounter method on
org.jboss.mq.server.jmx.DestinationMBeanSupport to do the same as above.
(See the DestinationMBeanSupport.txt file attached).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: