3

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)

Community
  • 1
  • 1
PastorPL
  • 968
  • 3
  • 17
  • 36

1 Answers1

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