Skip to content

Commit 5840520

Browse files
CarolynRountreeddsharpe
authored andcommitted
fix for domain discover issue found in 10.3.6 (#468)
1 parent 32bc525 commit 5840520

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

core/src/main/python/wlsdeploy/tool/discover/discoverer.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from wlsdeploy.logging.platform_logger import PlatformLogger
1919

2020
from wlsdeploy.tool.util.mbean_utils import MBeanUtils
21+
from wlsdeploy.tool.util.mbean_utils import get_interface_name
2122
from wlsdeploy.tool.discover.custom_folder_helper import CustomFolderHelper
2223
from wlsdeploy.tool.util.alias_helper import AliasHelper
2324
from wlsdeploy.tool.util.wlst_helper import WlstHelper
@@ -612,7 +613,7 @@ def _find_mbean_interface(self, location, interfaces):
612613
_method_name = '_find_mbean_interface'
613614
mbean_name = None
614615
for interface in interfaces:
615-
interface_name = str(interface.getTypeName())
616+
interface_name = get_interface_name(interface)
616617
if 'MBean' in interface_name:
617618
_logger.finer('WLSDPLY-06126', interface_name, self._alias_helper.get_model_folder_path(location),
618619
class_name=_class_name, method_name=_method_name)

core/src/main/python/wlsdeploy/tool/util/mbean_utils.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def _get_mbean_interface(self):
403403
class_name=self.__class__.__name__, method_name=_method_name)
404404
self.__mbean_interface = interfaces[0]
405405
self.__mbean_name = str(self.__mbean_interface.getSimpleName())
406-
self.__mbean_interface_name = str(self.__mbean_interface.getTypeName())
406+
self.__mbean_interface_name = get_interface_name(self._get_mbean_interface())
407407
_logger.exiting(class_name=self.__class__.__name__, method_name=_method_name,
408408
result=self.__mbean_interface_name)
409409

@@ -459,6 +459,15 @@ def _get_mbean_path(self):
459459
return self.__location.get_folder_path()
460460

461461

462+
def get_interface_name(mbean_interface):
463+
try:
464+
getname = getattr(mbean_interface, 'getTypeName')
465+
result = getname()
466+
except (Exception, JException):
467+
result = str(mbean_interface)
468+
return result
469+
470+
462471
def _is_empty(value):
463472
return value is None or len(value) == 0 or value == '[]' or value == 'null'
464473

0 commit comments

Comments
 (0)