aspose file tools*
The moose likes JBoss/WildFly and the fly likes Running java-threads in JBoss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Running java-threads in JBoss" Watch "Running java-threads in JBoss" New topic
Author

Running java-threads in JBoss

R Bieringa
Greenhorn

Joined: Nov 04, 2009
Posts: 25
Hi,

I'm working on an application that requires users starting batchlike-processes. The processes can taken up to hours to complete. Now this is implemented by classes, extending the thread-class.
The application is not in production, but will have to be within the near future. My question now is this: is this approach (running "standard" threads) a healthy one ? In the past, this wasn't even allowed on most application-servers.
If not, I know about one other solution: using JMS, which also makes running "asynchronous". But is there maybe an alternative, as messaging seems a bit of a "heavy" solution for this (like shooting a mosquito using a 120mm canon). But maybe I'm exaggerating.

I'm using JBoss 5.1.0 EAP and Java 6.

I would appreciate your input.

Ronald
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

Starting a separate thread within a Java EE app is a bad idea, it can lead to all kinds of problems. The JMS mechanism is really the way to go.


JBoss In Action
Dimitrios Bouras
Greenhorn

Joined: Oct 17, 2011
Posts: 1
Can you givee an example of how to implement this using JMS
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Running java-threads in JBoss