From 057f884903954203339182649daa100ef4ce89e3 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@d688527b-c9ab-4aba-bd8d-4036d912da1d> Date: Mon, 22 Dec 2003 17:28:21 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'Build_001'. git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/tags/Build_001@85 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../moa/spss/server/init/SystemInitializer.java | 122 --------------------- 1 file changed, 122 deletions(-) delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/init/SystemInitializer.java (limited to 'spss.server/src/at/gv/egovernment/moa/spss/server/init/SystemInitializer.java') diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/init/SystemInitializer.java b/spss.server/src/at/gv/egovernment/moa/spss/server/init/SystemInitializer.java deleted file mode 100644 index f968778d7..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/server/init/SystemInitializer.java +++ /dev/null @@ -1,122 +0,0 @@ -package at.gv.egovernment.moa.spss.server.init; - -import java.io.IOException; -import java.security.Security; - -import javax.net.ssl.SSLSocketFactory; - -import iaik.ixsil.init.IXSILInit; - -import at.gv.egovernment.moa.logging.LogMsg; -import at.gv.egovernment.moa.logging.Logger; -import at.gv.egovernment.moa.logging.LoggingContext; -import at.gv.egovernment.moa.logging.LoggingContextManager; -import at.gv.egovernment.moa.util.Constants; -import at.gv.egovernment.moa.util.DOMUtils; - -import at.gv.egovernment.moa.spss.MOAException; -import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider; -import at.gv.egovernment.moa.spss.server.iaik.config.IaikConfigurator; -import at.gv.egovernment.moa.spss.server.logging.IaikLog; -import at.gv.egovernment.moa.spss.server.service.RevocationArchiveCleaner; -import at.gv.egovernment.moa.spss.util.MessageProvider; - -/** - * MOA SP/SS web service initialization. - * - * @author Patrick Peck - * @version $Id$ - */ -public class SystemInitializer { - /** Interval between archive cleanups in seconds */ - private static final long ARCHIVE_CLEANUP_INTERVAL = 60 * 60; // 1h - /** The MOA SP/SS logging hierarchy. */ - private static final String LOGGING_HIERARCHY = "moa.spss.server"; - /** Whether XML schema grammars have been initialized. */ - private static boolean grammarsInitialized = false; - - /** - * Initialize the MOA SP/SS webservice. - */ - public static void init() { - MessageProvider msg = MessageProvider.getInstance(); - ClassLoader cl = SystemInitializer.class.getClassLoader(); - Thread archiveCleaner; - - // set up the MOA SPSS logging hierarchy - Logger.setHierarchy(LOGGING_HIERARCHY); - - // set up a logging context for logging the startup - LoggingContextManager.getInstance().setLoggingContext( - new LoggingContext("startup")); - - // load some jsse classes so that the integrity of the jars can be verified - // before the iaik jce is installed as the security provider - // this workaround is only needed when sun jsse is used in conjunction with - // iaik-jce (on jdk1.3) - try { - cl.loadClass("javax.security.cert.Certificate"); // from jcert.jar - } catch (ClassNotFoundException e) { - Logger.warn(msg.getMessage("init.03", null), e); - } - - // set up SUN JSSE SSL - Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider()); - System.setProperty( - "java.protocol.handler.pkgs", - "com.sun.net.ssl.internal.www.protocol"); - SSLSocketFactory.getDefault(); - - // initialize preparsed Xerces grammar pool for faster XML - // parsing/validating - try { - if (!grammarsInitialized) { - Class clazz = SystemInitializer.class; - // preparse XML schema - DOMUtils.addSchemaToPool( - clazz.getResourceAsStream(Constants.XML_SCHEMA_LOCATION), - Constants.XML_NS_URI); - // preparse XMLDsig Filter2 schema - DOMUtils.addSchemaToPool( - clazz.getResourceAsStream(Constants.DSIG_FILTER2_SCHEMA_LOCATION), - Constants.DSIG_FILTER2_NS_URI); - // preparse XMLDsig schema - DOMUtils.addSchemaToPool( - clazz.getResourceAsStream(Constants.DSIG_SCHEMA_LOCATION), - Constants.DSIG_NS_URI); - // preparse MOA schema - DOMUtils.addSchemaToPool( - clazz.getResourceAsStream(Constants.MOA_SCHEMA_LOCATION), - Constants.MOA_NS_URI); - grammarsInitialized = true; - } - } catch (IOException e) { - Logger.warn(new LogMsg(msg.getMessage("init.04", null)), e); - } - - // initialize configuration - try { - ConfigurationProvider config = ConfigurationProvider.getInstance(); - new IaikConfigurator().configure(config); - Logger.info(new LogMsg(msg.getMessage("init.01", null))); - } catch (MOAException e) { - Logger.fatal(new LogMsg(msg.getMessage("init.00", null)), e); - } - - // set IXSIL debug output - IXSILInit.setPrintDebugLog( - Logger.isDebugEnabled(IaikLog.IAIK_LOG_HIERARCHY)); - - // start the archive cleanup thread - archiveCleaner = - new Thread(new RevocationArchiveCleaner(ARCHIVE_CLEANUP_INTERVAL)); - archiveCleaner.setName("RevocationArchiveCleaner"); - archiveCleaner.setDaemon(true); - archiveCleaner.setPriority(Thread.MIN_PRIORITY); - archiveCleaner.start(); - - // unset the startup logging context - LoggingContextManager.getInstance().setLoggingContext(null); - } - -} -- cgit v1.2.3