In our application we are trying to compute quite a few results in parallel. For example :
- Select all insurance policies ( the result can be 100+)
- For each policy
- compute premium payment pattern (late fee, default, on-time etc) for all the years the policy had been active
Currently we have implemented steps 2 and 3 using a ThreadPool implementation. The application is a spring based .war deployment on JBoss 5.1.x Note that each thread kicked off is purely computational. There is no other external resource access such ad DB/filesystem or Jndi etc.
It is supposed to be a bad practice to create threads in a EE container. In this case we are creating and it is working perfectly fine ( better performance etc.). Is the restriction regarding thread creation strictly to Java EE based applications? or are we doing a risky business ? Is there a standard way to implement this?
Aucun commentaire:
Enregistrer un commentaire