0

I'm a newbie to Java EE, EJB3 and JBoss. I'm developing an EJB application which tests for the reachability of several devices using the ICMP protocol every 2 minutes.

The question is, whether it's okay to implement a Threadpool Executor from the java.util.concurrent package so that I can create my own pool of threads which can run in the server (JBoss AS 5.1.0) environment or is there a better alternative?

There are several posts out there relating to this topic but I'm simply not able to grasp them probably because I'm new to Java EE.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
rajesh
  • 179
  • 1
  • 3
  • 16

1 Answers1

0

An alternative is to use a timer that starts a scheduled tasks when the container starts. Starting tasks on container startup differs between different Java EE containers.

bkail's answer here shows how to setup a timer: questions on ejb3.0 timer service

(The accepted answer there shows how to do it in ejb3.1, which might not be an option for ejb 3.0)

Community
  • 1
  • 1
Aksel Willgert
  • 11,367
  • 5
  • 53
  • 74