grails tomcat -- are user errors isolated
If I have a grails app deployed in Tomcat with 100 users interacting with the site, and one user executes some code that results in an unrecoverable error / stacktrace, are the other 99 users totally isolated开发者_运维知识库 from that error? I'm thinking that should be the case with the underlying threading model, but I wanted to confirm.
Thanks
It depends on where the error happens. If it's something that is localized to the currently executing thread, then other users are not affected. You can, however, create something that will affect all users on the site - an extreme example being a call to System.exit() without a SecurityManager running.
So yes, Grails (or more precisely Tomcat or other application server) will run a thread for each separate request so throwing an exception will only be local to the thread where it gets thrown.
精彩评论