diff options
author | wbauer <wbauer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2008-10-01 10:49:31 +0000 |
---|---|---|
committer | wbauer <wbauer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2008-10-01 10:49:31 +0000 |
commit | 5702f241064f90106e8495f3cf23b6e6798d6501 (patch) | |
tree | 99f9f7492cd0017459ca06d4f415bf1c54b537f9 | |
parent | 7d3f6235a46f70323defa9910da240e61ca684b3 (diff) | |
download | mocca-5702f241064f90106e8495f3cf23b6e6798d6501.tar.gz mocca-5702f241064f90106e8495f3cf23b6e6798d6501.tar.bz2 mocca-5702f241064f90106e8495f3cf23b6e6798d6501.zip |
added project for local MOCCA
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@79 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
13 files changed, 119 insertions, 209 deletions
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 @@ </plugins>
</pluginManagement>
<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <mainClass>at.gv.egiz.bku.local.app.BKULauncher</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
<plugin>
- <artifactId>maven-dependency-plugin
- </artifactId>
- <executions>
- <execution>
- <id>copywar</id>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>at.gv.egiz</groupId>
- <artifactId>BKULocal</artifactId>
- <version>1.0-SNAPSHOT</version>
- <type>war</type>
- </artifactItem>
- </artifactItems>
- <outputDirectory>
- ${project.build.directory}/classes
- </outputDirectory>
- </configuration>
- </execution>
- <execution>
- <id>unpack-dependencies</id>
- <goals>
- <goal>unpack-dependencies</goal>
- </goals>
- <configuration>
- <excludes>javax/xml/crypto/**, demo/**,
- junit/**, w3/**, org/etsi/**, META-INF/**</excludes>
- <outputDirectory>${project.build.directory}/classes</outputDirectory>
- <overWriteReleases>true</overWriteReleases>
- <overWriteSnapshots>true</overWriteSnapshots>
- </configuration>
- </execution>
-
- </executions>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
+ </plugins>
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>sign</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <archive>
- <addMavenDescriptor>false</addMavenDescriptor>
- <index>false</index>
- <manifest>
- <addClasspath>false</addClasspath>
- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
- </manifest>
- </archive>
- <alias>test-applet signer</alias>
- <keystore>./keystore.ks</keystore>
- <storepass>storepass</storepass>
- <keypass>keypass</keypass>
- <verify>true</verify>
- </configuration>
- </plugin>
- </plugins>
</build>
<dependencies>
-
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
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 Binary files differnew file mode 100644 index 00000000..72c1d868 --- /dev/null +++ b/BKULocalApp/src/main/resources/splash.png 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<RequestType> 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ür das der Hashwert zu prüfen ist, kann nicht aufgelöst werden. 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ür das der Hashwert zu prüfen ist, kann nicht aufgelöst werden. 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 @@ <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <artifactId>bku</artifactId>
- <groupId>at.gv.egiz</groupId>
- <version>1.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>at.gv.egiz</groupId>
- <artifactId>utils</artifactId>
- <name>BKU Utils</name>
- <packaging>jar</packaging>
- <version>1.0-SNAPSHOT</version>
- <url>http://bku.egiz.gv.at</url>
- <build>
- <plugins>
- <!-- the unpack goal binds by default to process-sources
- | also works until phase prepare-package
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>unpack</id>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.outputDirectory}</outputDirectory>
- <excludes>META-INF\/</excludes>
- <artifactItems>
- <artifactItem>
- <groupId>at.gv.egiz</groupId>
- <artifactId>slbinding</artifactId>
- <type>jar</type>
- </artifactItem>
- <artifactItem>
- <groupId>at.gv.egiz</groupId>
- <artifactId>idlink</artifactId>
- <type>jar</type>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin-->
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
- <dependency>
- <groupId>iaik</groupId>
- <artifactId>iaik_jce_full_signed</artifactId>
- </dependency>
- <dependency>
- <groupId>iaik</groupId>
- <artifactId>iaik_ecc_signed</artifactId>
- </dependency>
- <dependency>
- <groupId>iaik</groupId>
- <artifactId>iaik_xsect</artifactId>
- </dependency>
- </dependencies>
- <!-- add dependencies to determine build order of BKU modules
- | (scope provided -> don't include dependencies in assembly)
- <dependencies>
- <dependency>
- <groupId>at.gv.egiz</groupId>
- <artifactId>slbinding</artifactId>
- <version>1.0-SNAPSHOT</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>at.gv.egiz</groupId>
- <artifactId>idlink</artifactId>
- <version>1.0-SNAPSHOT</version>
- <scope>provided</scope>
- </dependency>
- </dependencies-->
- <!--repositories>
- <repository>
- <id>maven2-repository.dev.java.net</id>
- <name>Java.net Maven 2 Repository</name>
- <url>http://download.java.net/maven/2</url>
- </repository>
- <repository>
- <id>maven-repository.dev.java.net</id>
- <name>Java.net Maven 1 Repository (legacy)</name>
- <url>http://download.java.net/maven/1</url>
- <layout>legacy</layout>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>maven2-repository.dev.java.net</id>
- <name>Java.net Maven 2 Repository</name>
- <url>http://download.java.net/maven/2</url>
- </pluginRepository>
- <pluginRepository>
- <id>maven-repository.dev.java.net</id>
- <name>Java.net Maven 1 Repository (legacy)</name>
- <url>http://download.java.net/maven/1</url>
- <layout>legacy</layout>
- </pluginRepository>
- </pluginRepositories-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>bku</artifactId>
+ <groupId>at.gv.egiz</groupId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>at.gv.egiz</groupId>
+ <artifactId>utils</artifactId>
+ <name>BKU Utils</name>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <url>http://bku.egiz.gv.at</url>
+ <build>
+ <plugins>
+ <!--
+ the unpack goal binds by default to process-sources | also works
+ until phase prepare-package <plugin>
+ <artifactId>maven-dependency-plugin</artifactId> <executions>
+ <execution> <id>unpack</id> <goals> <goal>unpack</goal> </goals>
+ <configuration>
+ <outputDirectory>${project.build.outputDirectory}</outputDirectory>
+ <excludes>META-INF\/</excludes> <artifactItems> <artifactItem>
+ <groupId>at.gv.egiz</groupId> <artifactId>slbinding</artifactId>
+ <type>jar</type> </artifactItem> <artifactItem>
+ <groupId>at.gv.egiz</groupId> <artifactId>idlink</artifactId>
+ <type>jar</type> </artifactItem> </artifactItems> </configuration>
+ </execution> </executions> </plugin
+ -->
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>iaik</groupId>
+ <artifactId>iaik_jce_full_signed</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>iaik</groupId>
+ <artifactId>iaik_ecc_signed</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>iaik</groupId>
+ <artifactId>iaik_xsect</artifactId>
+ </dependency>
+ </dependencies>
+ <!--
+ add dependencies to determine build order of BKU modules | (scope
+ provided -> don't include dependencies in assembly) <dependencies>
+ <dependency> <groupId>at.gv.egiz</groupId>
+ <artifactId>slbinding</artifactId> <version>1.0-SNAPSHOT</version>
+ <scope>provided</scope> </dependency> <dependency>
+ <groupId>at.gv.egiz</groupId> <artifactId>idlink</artifactId>
+ <version>1.0-SNAPSHOT</version> <scope>provided</scope> </dependency>
+ </dependencies
+ -->
+ <!--
+ repositories> <repository> <id>maven2-repository.dev.java.net</id>
+ <name>Java.net Maven 2 Repository</name>
+ <url>http://download.java.net/maven/2</url> </repository> <repository>
+ <id>maven-repository.dev.java.net</id> <name>Java.net Maven 1
+ Repository (legacy)</name> <url>http://download.java.net/maven/1</url>
+ <layout>legacy</layout> </repository> </repositories>
+ <pluginRepositories> <pluginRepository>
+ <id>maven2-repository.dev.java.net</id> <name>Java.net Maven 2
+ Repository</name> <url>http://download.java.net/maven/2</url>
+ </pluginRepository> <pluginRepository>
+ <id>maven-repository.dev.java.net</id> <name>Java.net Maven 1
+ Repository (legacy)</name> <url>http://download.java.net/maven/1</url>
+ <layout>legacy</layout> </pluginRepository> </pluginRepositories
+ -->
</project>
|