From 5702f241064f90106e8495f3cf23b6e6798d6501 Mon Sep 17 00:00:00 2001 From: wbauer Date: Wed, 1 Oct 2008 10:49:31 +0000 Subject: added project for local MOCCA git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@79 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKULocalApp/pom.xml | 93 ++++------- .../java/at/gv/egiz/bku/local/app/BKULauncher.java | 15 -- .../java/at/gv/egiz/bku/local/app/Container.java | 23 +-- BKULocalApp/src/main/resources/splash.png | Bin 0 -> 54978 bytes .../egiz/bku/online/conf/SpringConfigurator.java | 1 + .../service/impl/RequestBrokerSTALFactory.java | 2 +- .../egiz/stal/service/impl/STALRequestBroker.java | 2 +- .../stal/service/impl/STALRequestBrokerImpl.java | 2 +- .../gv/egiz/bku/online/conf/defaultConf.properties | 2 +- .../slexceptions/SLExceptionMessages.properties | 3 +- .../slexceptions/SLExceptionMessages_de.properties | 3 +- .../slexceptions/SLExceptionMessages_en.properties | 1 + utils/pom.xml | 181 +++++++++------------ 13 files changed, 119 insertions(+), 209 deletions(-) create mode 100644 BKULocalApp/src/main/resources/splash.png diff --git a/BKULocalApp/pom.xml b/BKULocalApp/pom.xml index e2d17d7c..9ad6f50b 100644 --- a/BKULocalApp/pom.xml +++ b/BKULocalApp/pom.xml @@ -28,76 +28,41 @@ + + org.apache.maven.plugins + maven-jar-plugin + + + + true + at.gv.egiz.bku.local.app.BKULauncher + + + + - maven-dependency-plugin - - - - copywar - - copy - - - - - at.gv.egiz - BKULocal - 1.0-SNAPSHOT - war - - - - ${project.build.directory}/classes - - - - - unpack-dependencies - - unpack-dependencies - - - javax/xml/crypto/**, demo/**, - junit/**, w3/**, org/etsi/**, META-INF/** - ${project.build.directory}/classes - true - true - - - - + maven-dependency-plugin + + + copy-dependencies + package + + copy-dependencies + + + ${project.build.directory} + false + false + true + + + + - - maven-jar-plugin - - - - sign - - - - - - false - false - - false - true - - - test-applet signer - ./keystore.ks - storepass - keypass - true - - - - commons-logging commons-logging diff --git a/BKULocalApp/src/main/java/at/gv/egiz/bku/local/app/BKULauncher.java b/BKULocalApp/src/main/java/at/gv/egiz/bku/local/app/BKULauncher.java index 091843e1..9a953f9e 100644 --- a/BKULocalApp/src/main/java/at/gv/egiz/bku/local/app/BKULauncher.java +++ b/BKULocalApp/src/main/java/at/gv/egiz/bku/local/app/BKULauncher.java @@ -168,20 +168,6 @@ public class BKULauncher implements BKUControllerInterface { } } - public void jwsHack() { - InputStream is = getClass().getClassLoader().getResourceAsStream( - "BKULocal-1.0-SNAPSHOT.war"); - File f = new File(System.getProperty("user.home") + "/.mocca/war"); - f.mkdirs(); - try { - OutputStream os = new FileOutputStream(new File(f, "mocca.war")); - StreamUtil.copyStream(is, os); - os.close(); - } catch (Exception e) { - log.error(e); - } - } - /** * @param args */ @@ -189,7 +175,6 @@ public class BKULauncher implements BKUControllerInterface { try { BKULauncher launcher = new BKULauncher(); - //launcher.jwsHack(); launcher.checkConfig(args); launcher.startUpServer(); launcher.initTrayIcon(); diff --git a/BKULocalApp/src/main/java/at/gv/egiz/bku/local/app/Container.java b/BKULocalApp/src/main/java/at/gv/egiz/bku/local/app/Container.java index 690639f4..a8a6431a 100644 --- a/BKULocalApp/src/main/java/at/gv/egiz/bku/local/app/Container.java +++ b/BKULocalApp/src/main/java/at/gv/egiz/bku/local/app/Container.java @@ -2,6 +2,8 @@ package at.gv.egiz.bku.local.app; import java.io.File; import java.io.IOException; +import java.net.URL; +import java.net.URLClassLoader; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -12,7 +14,6 @@ import org.mortbay.jetty.handler.DefaultHandler; import org.mortbay.jetty.handler.HandlerCollection; import org.mortbay.jetty.nio.SelectChannelConnector; import org.mortbay.jetty.security.SslSocketConnector; -import org.mortbay.jetty.webapp.WebAppClassLoader; import org.mortbay.jetty.webapp.WebAppContext; import org.mortbay.thread.QueuedThreadPool; @@ -26,8 +27,6 @@ public class Container { } public void init() { - Thread.currentThread().setContextClassLoader(ClassLoader.getSystemClassLoader()); - log.debug("-----------------> "+ClassLoader.getSystemClassLoader()); server = new Server(); QueuedThreadPool qtp = new QueuedThreadPool(); qtp.setMaxThreads(5); @@ -56,21 +55,9 @@ public class Container { WebAppContext webappcontext = new WebAppContext(); webappcontext.setContextPath("/"); webappcontext.setExtractWAR(false); - - File tmpDir = new File(System.getProperty("user.home") + "/.mocca/tmp"); - // tmpDir.mkdirs(); - // webappcontext.setTempDirectory(tmpDir); - try { - File f = new File(System.getProperty("user.home") - + "/.mocca/war/mocca.war"); - log.debug("Deploying war: " + f.getCanonicalPath()); - if (!f.exists()) { - log.error("WAR file does not exist, cannot run MOCCA"); - } - webappcontext.setWar(f.getParent()); - } catch (IOException e) { - log.error(e); - } + System.out.println(getClass().getClassLoader().getResource("log4j.properties")); + webappcontext.setWar("BKULocal-1.0-SNAPSHOT.war"); + handlers.setHandlers(new Handler[] { webappcontext, new DefaultHandler() }); server.setHandler(handlers); diff --git a/BKULocalApp/src/main/resources/splash.png b/BKULocalApp/src/main/resources/splash.png new file mode 100644 index 00000000..72c1d868 Binary files /dev/null and b/BKULocalApp/src/main/resources/splash.png differ diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/conf/SpringConfigurator.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/conf/SpringConfigurator.java index a369d829..6030c1c0 100644 --- a/BKUOnline/src/main/java/at/gv/egiz/bku/online/conf/SpringConfigurator.java +++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/conf/SpringConfigurator.java @@ -60,6 +60,7 @@ public class SpringConfigurator extends Configurator implements if ((appletTimeout != null)) { try { long ato = Long.parseLong(appletTimeout); + log.debug("Setting applet timeout to:"+ato); RequestBrokerSTALFactory.setTimeout(ato); } catch (NumberFormatException nfe) { log.error("Cannot set Applettimeout", nfe); diff --git a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/RequestBrokerSTALFactory.java b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/RequestBrokerSTALFactory.java index 45ee67d0..9c4aca28 100644 --- a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/RequestBrokerSTALFactory.java +++ b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/RequestBrokerSTALFactory.java @@ -32,7 +32,7 @@ import at.gv.egiz.stal.STALFactory; */ public class RequestBrokerSTALFactory implements STALFactory { - private static long timeout; + private static long timeout = -1; @Override public STAL createSTAL() { diff --git a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBroker.java b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBroker.java index af886eec..63eac311 100644 --- a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBroker.java +++ b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBroker.java @@ -32,7 +32,7 @@ import java.util.List; */ public interface STALRequestBroker extends STAL { - public static final int ERR_6000 = 6000; + public static final int ERR_4500 = 4500; public static final long DEFAULT_TIMEOUT_MS = 1000*60*5; //5mn public List connect(); diff --git a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java index bfa83dd4..4aa5130a 100644 --- a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java +++ b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java @@ -150,7 +150,7 @@ public class STALRequestBrokerImpl implements STALRequestBroker { // reqMon.setHashDataInput(null); requests.clear(); //TODO sync on requests? hashDataInputs.clear(); - return Collections.singletonList((STALResponse) new ErrorResponse(ERR_6000)); + return Collections.singletonList((STALResponse) new ErrorResponse(ERR_4500)); } } log.trace("consuming responses"); diff --git a/BKUOnline/src/main/resources/at/gv/egiz/bku/online/conf/defaultConf.properties b/BKUOnline/src/main/resources/at/gv/egiz/bku/online/conf/defaultConf.properties index d7fc5ae9..9766ae26 100644 --- a/BKUOnline/src/main/resources/at/gv/egiz/bku/online/conf/defaultConf.properties +++ b/BKUOnline/src/main/resources/at/gv/egiz/bku/online/conf/defaultConf.properties @@ -48,4 +48,4 @@ AppletTimeout=300000 #HTTPProxyHost=taranis.iaik.tugraz.at #HTTPProxyPort=8888 -#DefaultSocketTimeout=200 +DefaultSocketTimeout=200 diff --git a/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages.properties b/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages.properties index cf52a4c3..73409c8b 100644 --- a/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages.properties +++ b/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages.properties @@ -68,7 +68,8 @@ ec4119=Datum, f ec4120=Gewählter Infoboxbezeichner bereits vergeben. ec4121=Infobox mit spezifiziertem Bezeichner existiert nicht. ec4122=Inhalt der ausgewählten Infobox kann nicht als XML dargestellt werden. -ec4123=Assoziatives Array: Zum spezifizierten Schlüssel existiert kein Eintrag. +ec4123=Assoziatives Array: Zum spezifizierten Schlüssel existiert kein Eintrag. +ec4500=Die Sitzung ist abgelaufen. ec5000=Unklassifizierter Fehler in der Anzeigekomponente. ec5001=Anzeige von Daten des in der Befehlsanfrage angegebenen Mime-Types wird nicht unterstützt. ec5002=Zeichenkodierung der anzuzeigenden Daten ist fehlerhaft oder wird nicht unterstützt. diff --git a/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages_de.properties b/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages_de.properties index cf52a4c3..73409c8b 100644 --- a/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages_de.properties +++ b/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages_de.properties @@ -68,7 +68,8 @@ ec4119=Datum, f ec4120=Gewählter Infoboxbezeichner bereits vergeben. ec4121=Infobox mit spezifiziertem Bezeichner existiert nicht. ec4122=Inhalt der ausgewählten Infobox kann nicht als XML dargestellt werden. -ec4123=Assoziatives Array: Zum spezifizierten Schlüssel existiert kein Eintrag. +ec4123=Assoziatives Array: Zum spezifizierten Schlüssel existiert kein Eintrag. +ec4500=Die Sitzung ist abgelaufen. ec5000=Unklassifizierter Fehler in der Anzeigekomponente. ec5001=Anzeige von Daten des in der Befehlsanfrage angegebenen Mime-Types wird nicht unterstützt. ec5002=Zeichenkodierung der anzuzeigenden Daten ist fehlerhaft oder wird nicht unterstützt. diff --git a/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages_en.properties b/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages_en.properties index 8e0a09bc..91ca20e8 100644 --- a/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages_en.properties +++ b/bkucommon/src/main/resources/at/gv/egiz/bku/slexceptions/SLExceptionMessages_en.properties @@ -69,6 +69,7 @@ ec4120=Selected info box identifier already allocated. ec4121=Info box with specified identifier does not exist. ec4122=Contents of the selected info box cannot be displayed as XML. ec4123=Associative array: No entry for the specified key. +ec4500=The session expired. ec5000=Unclassified error in the viewer component. ec5001=Display of data of the mime type specified in the command request not supported. ec5002=Character encoding of the data to be displayed is invalid or not supported. diff --git a/utils/pom.xml b/utils/pom.xml index 7408f12b..d6b58234 100644 --- a/utils/pom.xml +++ b/utils/pom.xml @@ -1,108 +1,77 @@ - - - bku - at.gv.egiz - 1.0-SNAPSHOT - - 4.0.0 - at.gv.egiz - utils - BKU Utils - jar - 1.0-SNAPSHOT - http://bku.egiz.gv.at - - - - - - - - commons-logging - commons-logging - - - iaik - iaik_jce_full_signed - - - iaik - iaik_ecc_signed - - - iaik - iaik_xsect - - - - + + + bku + at.gv.egiz + 1.0-SNAPSHOT + + 4.0.0 + at.gv.egiz + utils + BKU Utils + jar + 1.0-SNAPSHOT + http://bku.egiz.gv.at + + + + + + + + commons-logging + commons-logging + + + iaik + iaik_jce_full_signed + + + iaik + iaik_ecc_signed + + + iaik + iaik_xsect + + + + -- cgit v1.2.3