View Single Post
Old 15-06-2010, 10:24   #8
tylerdurden83
Senior Member
 
Iscritto dal: Nov 2004
Messaggi: 691
Nuovo tentativo...

Codice:
try {
    ...
    while (true) {
        ...
        super.persist(parsable);
        super.sendJMSMessage((JMSPublishable)parsable);
        ...
    }
} catch (SAXException x) {
    super.logger.fatal("SAXException");
    super.logger.error("SAXException while creating the PatternMatchingHandler",x);
} catch (ParserConfigurationException x) {
    super.logger.fatal("ParserConfigurationException");
    super.logger.error("ParserConfigurationException while creating the PatternMatchingHandler",x);
} catch (InterruptedException x) {
    super.logger.fatal("InterruptedException");
    super.logger.error("The thread has been interrupted",x);
} catch (FileNotFoundException fnf){
    super.logger.fatal("FileNotFoundException");
    super.logger.error("A FileNotFoundException has been raised. It could be a temporary log being destroyed",fnf);
} catch (IOException ioe) {
    super.logger.fatal("IOException");
    super.logger.error("A generic IOException has been raised",ioe);
} catch (Exception e) {
    super.logger.fatal("Exception");
    super.logger.error("Failsafe generic Exception catching",e);
} finally {
    try {
        super.cleanUp();
        if(input!=null){input.close();}
        if(fileReader!=null){fileReader.close();}
        if(fs!=null){fs.close();}                
    } catch (Exception e) {
        super.logger.fatal("Exception nel finally()");
        super.logger.error("Some cleaning up in the finally block didn't work",e);
    }
    super.logger.fatal("A fatal exception has been caught, the whole process is about to be killed");
    System.exit(1);
}
Log:

Quote:
...
16:35:13,235 [pool-1-thread-7] [FATAL] implementation.LogTibcoEaimmReader - A fatal exception has been caught, the whole process is about to be killed
Ulteriori verifiche nel file di log:

Quote:
cat test.log_20100614 | grep FATAL
16:35:13,235 [pool-1-thread-7] [FATAL] implementation.LogTibcoEaimmReader - A fatal exception has been caught, the whole process is about to be killed

tail -100 test.log_20100614 | grep ERROR
nessuna entry...
Scusa se non ho ancora provato a rilanciarla ma queste catch sono dentro un metodo run di Runnable.
tylerdurden83 è offline   Rispondi citando il messaggio o parte di esso