JDK-6701498 : Change JMX query language to use * and ? as wildcards rather than % and _
  • Type: Enhancement
  • Component: core-svc
  • Sub-Component: javax.management
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-05-13
  • Updated: 2017-05-16
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b30Fixed
Related Reports
Relates :  
Description
The recently-added query language for the JMX API makes it possible to use an SQL-like language to write MBean queries, as an alternative to constructing them by chaining method calls.  The proposed language sticks closely to SQL, even going so far as to use SQL's wildcard characters in LIKE clauses.  So for example to specify MBeans that have an attribute Name beginning with "T" you would write "Name LIKE 'T%'".  Using % and _ as wildcards (meaning respectively any number of characters and exactly one character) is consistent with SQL, and also with JMS and JPA which both have SQL-like query languages too.  However it is inconsistent with wildcards elsewhere in the JMX API, which use * and ?.  It's more likely that someone using the JMX API will already be familiar with the */? convention than the %/_ one so we should prefer that.  This is also more consistent with the syntax for ObjectName matching in the language, where ObjectNames in a domain beginning with "T" are specified as "LIKE 'T*:*'".

Comments
EVALUATION JSR 255 Expert Group agrees on this and it needs to be fixed in JDK 7.
13-05-2008