Ejemplo n.º 1
0
    def disconnect(self):
        """
        Disconnects WLST from the current connected WebLogic Server instance.
        :raises: BundleAwareException of the specified type: if an error occurs
        """
        _method_name = 'disconnect'

        try:
            wlst_helper.disconnect()
        except PyWLSTException, pwe:
            ex = exception_helper.create_exception(self.__exception_type, 'WLSDPLY-19133',
                                                   pwe.getLocalizedMessage(), error=pwe)
            self.__logger.throwing(ex, class_name=self.__class_name, method_name=_method_name)
            raise ex
Ejemplo n.º 2
0
def __disconnect_domain():
    """
    Disconnects WLST from the domain by either disconnecting from the Admin Server or closing the domain read from disk.
    :raises DiscoverException: if a WLST error occurred while disconnecting or closing the domain
    """
    _method_name = '__disconnect_domain'

    __logger.entering(class_name=_class_name, method_name=_method_name)
    if __wlst_mode == WlstModes.ONLINE:
        try:
            wlst_helper.disconnect()
        except PyWLSTException, wlst_ex:
            ex = exception_helper.create_discover_exception(
                'WLSDPLY-06006', wlst_ex.getLocalizedMessage(), error=wlst_ex)
            __logger.throwing(ex,
                              class_name=_class_name,
                              method_name=_method_name)
            raise ex