Quote:
However, this concerns me: if for some reason the container can't provide the necesary connections, the complete JBoss becomes unstable because of this error. The client isn't going to like this for his production system..
The massindexer won't ask more and more connections, it will create at most one per worker thread. The max. worker threads is the sum of the size of the threadpools used at each stage, you can configure them all, for each root entity which is going to be indexed at the same time.
(threadsToLoadObjects + threadsForSubsequentFetching are the two that consume connections, multiply the result for each @Indexed type.
(actually subclasses of indexed type will share one).
So assuming you run it with 3 threadsToLoadObjects, 5 threadsForSubsequentFetching, and have two indexed objects, it will use at maximum 8*2=16 connections.
you can reduce thread usage by targeting a single instance each time, will take more time of course.
JMX exposes all the actual numbers so you can double check. Also via JConsole, the threads have labels so you can see them.