fixed a tiny bug with the producer logger
authorzapata <zapata>
Sat, 8 Jun 2002 22:13:30 +0000 (22:13 +0000)
committerzapata <zapata>
Sat, 8 Jun 2002 22:13:30 +0000 (22:13 +0000)
source/mir/storage/Database.java
source/mircoders/global/ProducerEngine.java

index 9f56efc..703e6e2 100755 (executable)
@@ -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;
        }
 
index 55c4944..b9c7fc6 100755 (executable)
@@ -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);