Log output excerpt:
What happens is this:
DelegatorFactory.getDelegator("default") is called during startup (CatalinaContainer init). After creating the delegator and putting it in the cache it calls delegator.initEntityEcaHandler(). Somewhere inside it tries to get a dispatcher, so the first ServiceDispatcher instance is initialized. Inside the constructor code the JobManager wants to access the database and somewhere inside the EntityExpr another call to DelegatorFactory.getDelegator("default") is done. As the ECAHandler is already initialized it now initializes the DCC using EntityCacheServices.setDelegator(). This creates the second ServiceDispatcher instance and starts up the first JmsListenerFactory thread. Further up the call stack, a little later the "outer" ServiceDispatcher now also creates a JmsListenerFactory thread. So we have two listeners and every JMS message is handled twice.
As a workaround we broke the recursion in the ServiceDispatcher constructor by doing a lazy initialization of the dispatcher in EntityCacheServices: We moved the call to EntityServiceFactory.getLocalDispatcher(delegator) out from the setDelegator method to when it is first needed.
This doesn't seem like the proper solution, though. Maybe someone with more insight on how all the initialization of the dispatcher and delegator works can contribute a proper fix.