I have got a problem (or doubt) about multithreading in jboss 7. My situation is more or less simillar to situation described here:I have got piece of code that is running in many threads and now I have to move it to jboss server. Only thing that is different is that I don't use EJB, just spring+hibernate. So my question is: should I follow the same steps as was written in the answer or there is any other way that I can create many threads? (I was exploring jboss and there was some place to configure thread factory and thread pools and I don't know if it is tool that I can use in my app)
Asked
Active
Viewed 1,208 times
3
-
1youre moving to jboss yet you dont use EJB? why move to jboss then?! – radai Apr 20 '13 at 18:25
-
so it will be a difference if I will use web container as tomcat? Then I can create additional threads? – PastorPL Apr 20 '13 at 18:45
-
Ok thanks, if you could post this as an answer, I will mark it as solution :) – PastorPL Apr 23 '13 at 10:05
-
ok, posted as an answer – radai Apr 23 '13 at 11:25
1 Answers
2
no, not really. its "illegal" to create threads in Java EE and under the servlet specifcation. the link you pointed to it the easiest way to do threading under a web/Java EE container - use @Asynchronous. note that you can return a Future from such a method if you want to wait for the results

Arjan Tijms
- 37,782
- 12
- 108
- 140

radai
- 23,949
- 10
- 71
- 115