Skip to content

Commit 6e390e2

Browse files
committed
JIRA WDT-47 Add WLS method to get mbean information for interface
1 parent 30fd048 commit 6e390e2

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

core/src/main/python/wlsdeploy/util/weblogic_helper.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
"""
2-
Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
33
The Universal Permissive License (UPL), Version 1.0
44
"""
55
import java.lang.Exception as JException
66
import java.lang.String as JString
77

8+
import weblogic.management.provider.ManagementServiceClient as ManagementServiceClient
89
import weblogic.security.internal.SerializedSystemIni as SerializedSystemIni
910
import weblogic.security.internal.encryption.ClearOrEncryptedService as ClearOrEncryptedService
1011
import weblogic.version as version_helper
@@ -209,6 +210,15 @@ def is_weblogic_version_or_above(self, str_version, use_actual_version=False):
209210

210211
return result
211212

213+
def get_bean_info_for_interface(self, interface_name):
214+
"""
215+
Returns the MBean information for the specified MBean interface.
216+
:param interface_name: the class name of the interface to be checked
217+
:return: the bean info access object for the specified interface
218+
"""
219+
bean_access = ManagementServiceClient.getBeanInfoAccess()
220+
return bean_access.getBeanInfoForInterface(interface_name, False, '9.0.0.0')
221+
212222
# We need to pad the actual version number for comparison purposes so
213223
# that is is never shorter than the specified version. Otherwise,
214224
# actual version 12.2.1 will be considered to be equal to 12.2.1.1

0 commit comments

Comments
 (0)