Thanks for the reproducer. The issue here is that you need to configure your infinispan cache to better support concurrency. If I reconfigure the default cache of the web cache-container to use <transaction mode="NONE"/>, I am able to run your sample app without issue.
FYI, WF 10.0.0.Final has an unfortunate bug associated with disabling txs on the web session cache:
[WFLY-6502] NPE during Session.requestDone(...) when using <transaction mode="NONE"/> - JBoss Issue Tracker
There is a fix for this in the queue:
WFLY-6502 NPE during Session.requestDone(...) when using <transaction mode="NONE"/> by pferraro · Pull Request #8834 · w…
Thanks for your response, is it posible to configure wildfly web cache proper in wildfly 10 without the need to fork wildfly and cherry pick your pull requests and compile it from scratch?
I see in documentation following description of transaction
This child element configures the transactional behaviour of the cache.
- mode This attribute configures the transaction mode, setting the cache transaction mode to one of NONE, NON_XA, NON_DURABLE_XA, FULL_XA.
- stop-timeout If there are any ongoing transactions when a cache is stopped, Infinispan waits for ongoing remote and local transactions to finish. The amount of time to wait for is defined by the cache stop timeout.
- locking This attribute configures the locking mode for this cache, one of OPTIMISTIC or PESSIMISTIC.
But web configuration is:
<cache-container name="web" default-cache="dist" module="org.wildfly.clustering.web.infinispan">
<distributed-cache name="dist" mode="ASYNC" l1-lifespan="0" owners="2">
Mode is BATCH which is not specified.
I think this is not issue with single session that can not make concurrent request, but none of user request are not handled, but I must to check it.
I don't really know why BATCH is the default, I think that concurrent request should be processed and as a option they should be blocked or something else.