use of com.sun.identity.shared.debug.impl.DebugProviderImpl in project OpenAM by OpenRock.
the class Debug method initialize.
/**
* Initializes the Debug Service by locating the SPI implementations and
* instantiating the appropriate classes.
*/
private static synchronized void initialize() {
if (!serviceInitialized) {
String providerName = SystemPropertiesManager.get(DebugConstants.CONFIG_DEBUG_PROVIDER);
IDebugProvider provider = null;
boolean providerLoadFailed = false;
Exception exceptionCatched = null;
if (providerName != null && providerName.trim().length() > 0) {
try {
provider = (IDebugProvider) Class.forName(providerName).newInstance();
} catch (ClassNotFoundException cnex) {
providerLoadFailed = true;
exceptionCatched = cnex;
} catch (InstantiationException iex) {
providerLoadFailed = true;
exceptionCatched = iex;
} catch (IllegalAccessException iaex) {
providerLoadFailed = true;
exceptionCatched = iaex;
} catch (ClassCastException ccex) {
providerLoadFailed = true;
exceptionCatched = ccex;
}
}
if (provider == null) {
if (providerLoadFailed) {
ResourceBundle bundle = com.sun.identity.shared.locale.Locale.getInstallResourceBundle("amUtilMsgs");
StdDebugFile.printError(Debug.class.getSimpleName(), bundle.getString("com.iplanet" + ".services" + ".debug.invalidprovider"), exceptionCatched);
}
provider = new DebugProviderImpl();
}
setDebugProvider(provider);
serviceInitialized = true;
}
}
use of com.sun.identity.shared.debug.impl.DebugProviderImpl in project OpenAM by OpenRock.
the class DebugTestTemplate method initializeProvider.
/**
* Initialize the debug provider
*
* @param debugConfigPath
*/
public void initializeProvider(String debugConfigPath) throws InvalidDebugConfigurationException {
DebugConfigurationFromProperties debugConfig = new DebugConfigurationFromProperties(debugConfigPath);
debugFileProvider = new DebugFileProviderForTest(debugConfig, TimeService.SYSTEM);
provider = new DebugProviderImpl(debugFileProvider);
}
use of com.sun.identity.shared.debug.impl.DebugProviderImpl in project OpenAM by OpenRock.
the class DebugTestTemplate method initializeProvider.
/**
* Initialize the debug provider
*
* @param debugConfigPath
*/
public void initializeProvider(String debugConfigPath) throws InvalidDebugConfigurationException {
DebugConfigurationFromProperties debugConfig = new DebugConfigurationFromProperties(debugConfigPath);
debugFileProvider = new DebugFileProviderForTest(debugConfig, TimeService.SYSTEM);
provider = new DebugProviderImpl(debugFileProvider);
}
Aggregations