From: zapata Date: Sat, 8 Jun 2002 22:13:30 +0000 (+0000) Subject: fixed a tiny bug with the producer logger X-Git-Tag: prexmlproducerconfig~62 X-Git-Url: http://erislabs.net/gitweb/?p=mir.git;a=commitdiff_plain;h=2b178c7a2d951c429b7123dd1f8cc3784a7178eb fixed a tiny bug with the producer logger --- diff --git a/source/mir/storage/Database.java b/source/mir/storage/Database.java index 9f56efc9..703e6e20 100755 --- a/source/mir/storage/Database.java +++ b/source/mir/storage/Database.java @@ -253,8 +253,8 @@ public class Database implements StorageObject { break; case java.sql.Types.TIMESTAMP: //Timestamp timestamp = (rs.getTimestamp(valueIndex)); - //jbdc drops time zone info, - //so just get the string from + //jbdc drops time zone info, + //so just get the string from //postgres String timestamp = (rs.getString(valueIndex)); if (!rs.wasNull()) { @@ -560,9 +560,10 @@ public class Database implements StorageObject { int size = metadataFields.size(); for (int i = 0; i < size; i++) { // alle durchlaufen bis nix mehr da + theType = metadataTypes[i]; if (theType == java.sql.Types.LONGVARBINARY) { - InputStream us = rs.getAsciiStream(i + 1); +/* InputStream us = rs.getAsciiStream(i + 1); if (us != null) { InputStreamReader is = new InputStreamReader(us); char[] data = new char[32768]; @@ -573,10 +574,13 @@ public class Database implements StorageObject { } is.close(); theResult = theResultString.toString(); + + theResult = null; } else { theResult = null; } +*/ theResult = null; } else { theResult = getValueAsString(rs, (i + 1), theType); @@ -598,14 +602,14 @@ public class Database implements StorageObject { } } catch (IllegalAccessException e) { throwStorageObjectException("Kein Zugriff! -- " + e.toString()); - } catch (IOException e) { +/* } catch (IOException e) { throwStorageObjectException("IOException! -- " + e.toString()); - } catch (InstantiationException e) { +*/ } catch (InstantiationException e) { throwStorageObjectException("Keine Instantiiierung! -- " + e.toString()); - } catch (SQLException sqe) { +/* } catch (SQLException sqe) { throwSQLException(sqe, "makeEntityFromResultSet"); return null; - } +*/ } return returnEntity; } diff --git a/source/mircoders/global/ProducerEngine.java b/source/mircoders/global/ProducerEngine.java index 55c49440..b9c7fc67 100755 --- a/source/mircoders/global/ProducerEngine.java +++ b/source/mircoders/global/ProducerEngine.java @@ -17,7 +17,9 @@ public class ProducerEngine { producers = MirGlobal.localizer().producers().factories(); producerJobQueue = new JobQueue(); try { - log = new PrintWriter(new FileWriter( (new RandomAccessFile(MirGlobal.getConfigProperty("Home") + "/" + MirGlobal.getConfigProperty("Producer.Logfile"), "rw")).getFD())); + RandomAccessFile raFile = (new RandomAccessFile(MirGlobal.getConfigProperty("Home") + "/" + MirGlobal.getConfigProperty("Producer.Logfile"), "rw")); + raFile.seek(raFile.length()); + log = new PrintWriter(new FileWriter( raFile.getFD())); } catch (Exception e) { // throw new ProducerEngineRuntimeExc("Creating PrintWriter log failed",e);