WLS 7.0 SP4 - getMBeansByType("ServerConfig") on MBeanHome.LOCAL_JNDI_NAME returns > 1 when invoked in managed server - CR172168
(Doc ID 774927.1)
Last updated on JUNE 03, 2024
Applies to:
Oracle WebLogic Server - Version 7.0 and laterInformation in this document applies to any platform.
Information in this document applies to any platform
Goal
If this code is run on a server: home = (MBeanHome) ctx.lookup(MBeanHome.LOCAL_JNDI_NAME); ... System.out.println("Invoking home.getMBeansByType('xxxxxxx)..."); Set AllMBeans = (Set)home.getMBeansByType("xxxxxx"); System.out.println("Going into loop..."); for (Iterator itr = AllMBeans.iterator(); itr.hasNext(); ) { DynamicMBean mbean = (DynamicMBean)itr.next(); System.out.println("Matches to the MBean query: " + mbean);" } ... On an admin server it will return: Invoking homeServer.getMBeansByType('xxxxxxx).... Going into loop... Matches to the MBean query: Proxy for <DOMAIN-NAME>:Location=<location1>,Name=<Name1>,Type=<Type> While on a managed server it will return: Invoking homeServer.getMBeansByType('xxxxxx).... Going into loop... Matches to the MBean query: Proxy for <DOMAIN-NAME>:Location=<location2>,Name=<Name3>,Type=<Type> Matches to the MBean query: Proxy for <DOMAIN-NAME>:Location=<location2>,Name=<Name2>,Type=<Type> Matches to the MBean query: Proxy for <DOMAIN-NAME>:Location=<location2>,Name=<Name1>,Type=<Type> In our documentation we state: A local MBeanHome provides access only to the Local Configuration MBeans and Runtime MBeans on a specific server instance. It saves you the trouble of iterating through lists of MBeans. It also uses fewer network hops to access MBeans because it requires your client to establish a direct connection to the server instance. CONFIGURATION: WLS 7.0 SP4, JDK 1.3.1_08
Solution
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Goal |
Solution |