use of alma.ACSErrTypeCommon.wrappers.AcsJIllegalArgumentEx in project ACS by ACS-Community.
the class DALImpl method set_logLevels.
/**
* Sets log levels for a particular named logger. If levels.useDefault is
* true, then the logger will be reset to using default levels; otherwise it
* will use the supplied local and remote levels.
*/
public void set_logLevels(String logger_name, LogLevels levels) throws LoggerDoesNotExistEx, IllegalLogLevelsEx {
if (levels.useDefault) {
logConfig.clearNamedLoggerConfig(logger_name);
} else {
try {
UnnamedLogger config = AcsLogLevelDefinition.createXsdLogLevelsFromIdl(levels);
logConfig.setNamedLoggerConfig(logger_name, config);
} catch (AcsJIllegalArgumentEx ex) {
//throw ex.toIllegalArgumentEx();
IllegalLogLevelsEx ille = new IllegalLogLevelsEx(ex.getErrorDesc());
throw ille;
}
}
}
use of alma.ACSErrTypeCommon.wrappers.AcsJIllegalArgumentEx in project ACS by ACS-Community.
the class AcsNcReconnectionCallback method registerForReconnect.
/**
* Called by the event subscriber or supplier when connecting to the NC.
* Corba-activates this callback object using <code>services</code> and
* registers it with the NotifyService's {@link ReconnectionRegistry}.
* <p>
* @throws AcsJContainerServicesEx
* @throws AcsJIllegalArgumentEx
* @TODO: This call does not do anything if the <code>ecf == null</code>,
* which is also mentioned in comments in the calling code.
* This should be cleaned up, e.g. checked if at all and under which circumstances
* this null can happen.
*/
public void registerForReconnect(ContainerServicesBase services, EventChannelFactory ecf) throws AcsJContainerServicesEx, AcsJIllegalArgumentEx {
// TODO: This is strange...
if (ecf == null) {
return;
}
if (services == null) {
AcsJIllegalArgumentEx ex = new AcsJIllegalArgumentEx();
ex.setVariable("services");
ex.setValue("null");
throw ex;
}
this.services = services;
ReconnectionRegistry registry = null;
try {
registry = ReconnectionRegistryHelper.narrow(ecf);
} catch (BAD_PARAM ex) {
// TODO: Or should we just return, same deal as above with ecf == null?
AcsJIllegalArgumentEx ex2 = new AcsJIllegalArgumentEx(ex);
ex2.setErrorDesc("The given EventChannelFactory is not a NotifyExt.ReconnectionRegistry. Make sure TAO extensions are used!");
throw ex2;
}
ecf_ = ecf;
ReconnectionCallback callback = ReconnectionCallbackHelper.narrow(services.activateOffShoot(this));
callback_id_ = registry.register_callback(callback);
id_is_valid_ = true;
}
use of alma.ACSErrTypeCommon.wrappers.AcsJIllegalArgumentEx in project ACS by ACS-Community.
the class Helper method splitChannelAndDomainName.
private static String[] splitChannelAndDomainName(String channelWithDomainName) throws AcsJIllegalArgumentEx {
String[] ret = channelWithDomainName.split(NAMESERVICE_BINDING_NC_DOMAIN_SEPARATOR.value);
if (ret.length == 2) {
return ret;
} else {
AcsJIllegalArgumentEx ex = new AcsJIllegalArgumentEx();
ex.setVariable("channelWithDomainName");
ex.setValue(channelWithDomainName);
ex.setErrorDesc("No unique NC - domain separation found in NC binding.");
throw ex;
}
}
use of alma.ACSErrTypeCommon.wrappers.AcsJIllegalArgumentEx in project ACS by ACS-Community.
the class LaserComponent method set_default_logLevels.
/**
* Sets the log levels of the default logging configuration. These levels
* are used by all loggers that have not been configured individually.
*/
public void set_default_logLevels(LogLevels levels) throws IllegalLogLevelsEx {
try {
logConfig.setDefaultMinLogLevel(AcsLogLevelDefinition.fromInteger(levels.minLogLevel));
logConfig.setDefaultMinLogLevelLocal(AcsLogLevelDefinition.fromInteger(levels.minLogLevelLocal));
} catch (AcsJIllegalArgumentEx ex) {
//throw ex.toIllegalArgumentEx();
IllegalLogLevelsEx ille = new IllegalLogLevelsEx(ex.getErrorDesc());
throw ille;
}
}
use of alma.ACSErrTypeCommon.wrappers.AcsJIllegalArgumentEx in project ACS by ACS-Community.
the class HibernateWDALImpl method set_default_logLevels.
/**
* Sets the log levels of the default logging configuration. These levels
* are used by all loggers that have not been configured individually.
*/
public void set_default_logLevels(LogLevels levels) throws IllegalLogLevelsEx {
try {
logConfig.setDefaultMinLogLevel(AcsLogLevelDefinition.fromInteger(levels.minLogLevel));
logConfig.setDefaultMinLogLevelLocal(AcsLogLevelDefinition.fromInteger(levels.minLogLevelLocal));
} catch (AcsJIllegalArgumentEx ex) {
//throw ex.toIllegalArgumentEx();
IllegalLogLevelsEx ille = new IllegalLogLevelsEx(ex.getErrorDesc());
throw ille;
}
}
Aggregations