Message message =
ERR_CONFIG_NETWORK_GROUP_POLICY_CANNOT_INITIALIZE.get(String
.valueOf(className), String.valueOf(policyConfiguration
.dn()), stackTraceToSingleLineString(e));
throw new InitializationException(message, e);
}
// Perform the necessary initialization for the network group
// policy.
QOSPolicy policy;
try
{
// Determine the initialization method to use: it must take a
// single parameter which is the exact type of the configuration
// object.
Method method =
theClass.getMethod("createQOSPolicy", policyConfiguration
.configurationClass());
policy = (QOSPolicy) method.invoke(factory, policyConfiguration);
}
catch (Exception e)
{
if (e instanceof InvocationTargetException)
{
Throwable t = e.getCause();
if (t instanceof InitializationException)
{
throw (InitializationException) t;
}
else if (t instanceof ConfigException)
{
throw (ConfigException) t;
}
}
if (debugEnabled())
{
TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
Message message =
ERR_CONFIG_NETWORK_GROUP_POLICY_CANNOT_INITIALIZE.get(String
.valueOf(className), String.valueOf(policyConfiguration
.dn()), stackTraceToSingleLineString(e));
throw new InitializationException(message, e);
}
// The network group has been successfully initialized - so register
// it.
QOSPolicy oldPolicy =