3. Briefly explain the different ways of using thread in Java/J2EE. How have you used one or more of these techniques in your code?
Can somebody help me quick with this question? Which ways they are talking about?
URL is OK
Thanks,
Sabina
3. Briefly explain the different ways of using thread in Java/J2EE. How have you used one or more of these techniques in your code?
Sabina wrote:3. Briefly explain the different ways of using thread in Java/J2EE. How have you used one or more of these techniques in your code?
Can somebody help me quick with this question? Which ways they are talking about?
URL is OK
Thanks,
Sabina
Blake wrote:В J2EE лучше вообще не использовать threads, особенно в EJB контeйнере, где транзакции завязаны на current thread. Вопрос, IMHO, провокационный
Sabina wrote:Blake wrote:В J2EE лучше вообще не использовать threads, особенно в EJB контeйнере, где транзакции завязаны на current thread. Вопрос, IMHO, провокационный
Так и написала, только вот теперь переживаю, что они подумают, что это я сама такая умная
Сабина
Blake wrote:Иногда в сервлетах используют, но, IMHO, это не очень хороший дизайн создавать свои threads в "чужих" контайнерах
Sabina wrote:3. Briefly explain the different ways of using thread in Java/J2EE. How have you used one or more of these techniques in your code?
By the way, J2EE generally discourages multithreading (JMS is an exception). I believe that Tomcat or any J2EE container will provide synchronization through the get and set methods (ServletContext.getAttribute and ServletContext.setAttribute, for instance) so that you don't have to perform synchronization. After all, how could J2EE explicitly forbid the user to perform threading but allow the user to perform synchronization?
JMS is an exception
After all, how could J2EE explicitly forbid the user to perform threading but allow the user to perform synchronization?