Java Reference
In-Depth Information
23:42:48,456 INFO [TaskListener]
(EE-ManagedExecutorService-default-Thread-2) Starting
23:42:48,456 INFO [GenerateSeatRequestFromArtificial]
(EE-ManagedExecutorService-default-Thread-2) Sleeping... (2)
23:42:53,457 INFO [GenerateSeatRequestsFromDatabase]
(EE-ManagedExecutorService-default-Thread-1) Finished
23:42:53,461 INFO [GenerateSeatRequestFromArtificial]
(EE-ManagedExecutorService-default-Thread-2) Finished
23:42:53,461 INFO [TaskListener]
(EE-ManagedExecutorService-default-Thread-2) Finished task
23:42:53,617 INFO [GenerateSeatRequestsFromDatabase]
(EE-ManagedExecutorService-default-Thread-1) Requesting
booking for [1]
23:42:53,621 INFO [PendingSeats] (ServerService Thread
Pool -- 54) [1, 4, 5, 6] (3)
As you can see, both tasks started at the same time (1 and 2) in two separate threads (no-
tice the EE-ManagedExecutorService-default-Thread-1 and …-
Thread-2 entries in the log). The final result is yielded after roughly 5 seconds, and it
contains data from both the collectors, and additionally, is collected in the thread that ori-
ginally submitted the tasks ( ServerService Thread Pool -- 54 ).
You can also use the Java VisualVM tool to visualize your threads in the application serv-
er. The tool is available in your JDK installation in the bin directory (the jvisualvm
executable). After running it, you should see JBoss in the left tree and the Threads tab
after clicking on the JBoss node. This is shown in the following screenshot:
Search WWH ::

Custom Search