aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2016-03-31 14:36:38 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2016-03-31 14:36:38 +0200
commit4a347b1c7784e2c756c2bcae973d3b6da0ba8e62 (patch)
tree10d41265dc42d36606b24abc072da11874134ec6 /id/server/idserverlib
parentc07d9264db58c1746009d358d91362568d5a9ccf (diff)
downloadmoa-id-spss-4a347b1c7784e2c756c2bcae973d3b6da0ba8e62.tar.gz
moa-id-spss-4a347b1c7784e2c756c2bcae973d3b6da0ba8e62.tar.bz2
moa-id-spss-4a347b1c7784e2c756c2bcae973d3b6da0ba8e62.zip
fix missing implementation in ExceptionContainer
Diffstat (limited to 'id/server/idserverlib')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/ExceptionContainer.java5
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/DBTransactionStorage.java6
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/ITransactionStorage.java3
3 files changed, 12 insertions, 2 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/ExceptionContainer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/ExceptionContainer.java
index 5e3fb5df6..1c6fdcb65 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/ExceptionContainer.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/ExceptionContainer.java
@@ -22,12 +22,15 @@
*/
package at.gv.egovernment.moa.id.data;
+import java.io.Serializable;
+
/**
* @author tlenz
*
*/
-public class ExceptionContainer {
+public class ExceptionContainer implements Serializable {
+ private static final long serialVersionUID = 5355860753609684995L;
private Throwable exceptionThrown = null;
private String uniqueSessionID = null;
private String uniqueTransactionID = null;
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/DBTransactionStorage.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/DBTransactionStorage.java
index 6778dc32e..c2b3b0fc5 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/DBTransactionStorage.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/DBTransactionStorage.java
@@ -242,6 +242,12 @@ public class DBTransactionStorage implements ITransactionStorage {
element.setType(value.getClass().getName());
element.setDatatime(new Date());
+ if (!Serializable.class.isInstance(value)) {
+ Logger.warn("Transaction-Storage can only store objects which implements the 'Seralizable' interface");
+ throw new MOADatabaseException("Transaction-Storage can only store objects which implements the 'Seralizable' interface", null);
+
+ }
+
//serialize the Assertion for Database storage
byte[] data = SerializationUtils.serialize((Serializable) value);
element.setAssertion(data);
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/ITransactionStorage.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/ITransactionStorage.java
index fe959c39d..493f24ee8 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/ITransactionStorage.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/ITransactionStorage.java
@@ -46,7 +46,8 @@ public interface ITransactionStorage {
* Store a data object with a key to transaction storage
*
* @param key Id which identifiers the data object
- * @param value Data object which should be stored
+ * @param value Data object which should be stored.
+ * This data must implement the <code>java.io.Serializable</code> interface
* @throws MOADatabaseException In case of store operation failed
*/
public void put(String key, Object value) throws MOADatabaseException;