This content has been marked as final.
Show 4 replies
-
1. Re: DOS issue - DefaultUncaughtExceptionHandler needs to be
elkner Mar 20, 2006 6:27 PM (in response to elkner)Found a solution by myself:
--- jboss-4.0.4RC1-src/system/src/main/org/jboss/system/server/ServerImpl.java.orig Mon Mar 20 23:38:02 2006 +++ jboss-4.0.4RC1-src/system/src/main/org/jboss/system/server/ServerImpl.java Mon Mar 20 23:45:07 2006 @@ -172,6 +172,16 @@ // masqurade as Server.class (cause Impl is not really important) log = Logger.getLogger(Server.class); + // log uncaught errors as well - avoid DOS since System.err output gets + // logged line by line - + // see ThreadGroup.uncaughtException(Thread t, Throwable e) + Thread.setDefaultUncaughtExceptionHandler(new Thread + .UncaughtExceptionHandler() { + public void uncaughtException(Thread t, Throwable e) { + log.error("Uncaught exception in " + t.getName(), e); + } + } + ); // Setup URL handlers - do this before initializing the ServerConfig initURLHandlers(); config.initURLs();
-
2. Re: DOS issue - DefaultUncaughtExceptionHandler needs to be
starksm64 Mar 25, 2006 1:30 PM (in response to elkner)An NPE should not result in an uncaught exception. Create a jira issue describing how this occurs.
http://jira.jboss.com/jira/browse/EJBTHREE -
3. Re: DOS issue - DefaultUncaughtExceptionHandler needs to be
elkner Mar 25, 2006 4:06 PM (in response to elkner)Hmm, already fixed that stuff and have no ex. handy anymore. If I'm remember correctly, I created a Thread (more or less long running task) from within a bean and within the thread I got an NPE ...
-
4. Re: DOS issue - DefaultUncaughtExceptionHandler needs to be
starksm64 Mar 28, 2006 11:46 AM (in response to elkner)Ok, if your creating threads you are responsible for them behaving badly. I have created a feature request to configure a DefaultUncaughtExceptionHandler.
http://jira.jboss.com/jira/browse/JBAS-3022