Hi all,

In similarity with what i know from looking up the management bean over
other application servers, over OpenEJB 3.1.1 i ran the following code :

Properties props = new Properties();
                props.put("java.naming.factory.initial",
"org.apache.openejb.client.RemoteInitialContextFactory");
                props.put(Context.PROVIDER_URL,"ejbd://127.0.0.1:4201");        
        
                InitialContext ctx = new InitialContext(props);
                Object ref = ctx.lookup("MEJB");
                ManagementHome mHome = (ManagementHome)
PortableRemoteObject.narrow(ref,ManagementHome.class);
                Management mejb = mHome.create();
                
                StringBuilder queryBuilder = new StringBuilder(100);            
                queryBuilder.append("*" + ":").append("j2eeType=").append(
"J2EEApplication");
                String query = queryBuilder.toString();
                
                Set<?> result = mejb.queryNames(new ObjectName(query), null);
                System.out.println(result.size());

Unfortunately, having in mind that i have deployed 2 applications (ejb
modules), i always get 0 from the snippet above! I tried with
"j2eeType=EJBModule", with the same result.

What am i doing wrong in order to query the MBean provider ?


recursion.

-- 
View this message in context: 
http://www.nabble.com/Am-i-using-the-OpenEJB-JMX-provider-correctly---tp24033204p24033204.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to