When you spawn new Java worker threads in your WebObjects application, your console starts listing hundreds or thousands of messages like the following:
These messages are innocuous and should not affect your application, but they can be annoying because they can clutter a log file.
These messages appear because your Java code, in combination with the Java Bridge, is creating Objective-C objects. Objective-C uses "autorelease pools" for memory management. An autorelease pool gets created at the beginning of a request-response cycle for the main thread of a WebObjects application. If you spawn an additional thread in Java, you need to create an autorelease pool to manage the memory for the Objective-C objects that get created.
Insert the NSAutoreleasePool at the beginning of your Java thread's run() method:
Objective-C syntax
Note: This is the Objective-C equivalent of the Java push() and pop() methods above
myThreadFunc()
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
... // do your stuff
[pool release];
}