I am charged with refactoring a
J2EE application (WebLogic 10) and have come across code that creates threads (extend java.lang.Thread). I seem to remember from my early reading on J2EE that it is bad practice to spawn your own threads in a J2EE container, and also that there are better ways of achieving concurrency.
Question 1: Why are threads in a container problematic and what kind of problems can they cause?
Question 2: What are the best practices for achieving concurrency?