Hi

> I have two MBeans(only mbeans, not services)
> AxielleConfiguration, AxielleTest1.
> 
> I registered these two beans with the server.
> when i query mbeanserver it is giving all the MBeans in the server.
> 
> i am querying like this
> 
> ObjectName obj = new ObjectName("AxielleDomain:service=* ");

You cannot search inside a key-value pair. Use an object name like this
ObjectName obj = new ObjectName( "AxielleDomain:*" );
or
ObjectName obj = new ObjectName( "AxielleDomain:service=mine,*" );


> Set set = mbeanServer.queryMBeans(obj, null);
> 
> if i use the above code, it is giving malformed exception.
> 
> At the * what i need to pass, so that i can get above two beans
> 
> I tried by using queryexp  as follows
> 
> QueryExp qexp = Query.match(Query.attr("ObjectName"),
> Query.value("AxielleDomain:service=Axielle*"));

I think you should add a colon before the *
Query.value("AxielleDomain:service=Axielle,*"));

> Set set = mbeanServer.queryMBeans(null,qexp);
> now i am getting set size as zero.
> 
> Is it properway of creating queryExp ?
> If not what is the properway

Hope this helps

Andy



_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to