1) Websphere runs on the IBM JVM. What are the odds that the IBM JVM's GC doesn't collect garbage objects created by my custom threads ?
I don't know the exact answer to this , I'd be surprised if they were not garbage collected. Probably a question for an IBM gc programmer, however there are application developer tools you can use to try and determine this.
1. Use a profiler in RAD to see if the objects created by the unmanaged threads are garbage collected ? Run your server in profile mode for x amount of minutes , force a gc then view the profiling output. There should be a column in the profile view of objects collected.
2. Run your server for x amount of time with only your servlets executing (no online users) , force a heap dump analyze the heap using a HeapAnalyzer. Allow the application run for another x amount of hours
force a heap dump . Do this multiple times, if the number of unmanaged object references are growing on each heap dump, you may have a potential memory leak.
Option 1 is more exact as you have proof of these objects being collected or not.
2) Are there any other drawbacks in creating custom threads within a servlet environment ?
IBM don't recommend you create unmanaged threads due to some of the reasons listed in the following linkhttp://www.ibm.com/developerworks/websphere/techjournal/0609_alcott/0609_alcott.html#spring-4
such as preventing graceful shutdown, releasing resources, unable to create an InitialContext (i believe new InitialContext() in unmanaged threads returns null) etc. I think they have an alternative approach to doing custom threading using the WorkManager API see http://www.ibm.com/developerworks/websphere/techjournal/0606_johnson/0606_johnson.html
In terms of the ejb/servlet specs creating threads in an ejb breaks the spec see (page 563 of ejb 2.1 spec )
The enterprise bean must not attempt to manage threads. The enterprise bean must not attempt
to start, stop, suspend, or resume a thread, or to change a thread’s priority or name. The enter-
prise bean must not attempt to manage thread groups.
The servlet spec is not as strict , I think it translates to not having the InitailContext available is unmanaged threads.
In terms of your application design why do you need to create these lists in a thread in an infinite loop ? Are you using this servlet as a sort of batch job scheduler ?