Buggy code:
public class DistributedCacheManagerFactory implements org . jboss . as . clustering . web . DistributedCacheManagerFactory { public static final String DEFAULT_CACHE_CONTAINER = "web" ; public static final String DEFAULT_JVM_ROUTE_CACHE = "registry" ; public static final Short SCOPE_ID = Short . valueOf ( ( ( short ) ( 222 ) ) ) ; private SessionAttributeStorageFactory storageFactory = new SessionAttributeStorageFactoryImpl ( ) ; private CacheInvoker invoker = new RetryingCacheInvoker ( 10 , 100 ) ; private SessionAttributeMarshallerFactory marshallerFactory = new SessionAttributeMarshallerFactoryImpl ( ) ; @ SuppressWarnings ( "rawtypes" ) private final InjectedValue < Cache > sessionCache = new InjectedValue < Cache > ( ) ; @ SuppressWarnings ( "rawtypes" ) private final InjectedValue < Cache > jvmRouteCache = new InjectedValue < Cache > ( ) ; private final InjectedValue < SharedLocalYieldingClusterLockManager > lockManager = new InjectedValue < SharedLocalYieldingClusterLockManager > ( ) ; @ Override public < T extends OutgoingDistributableSessionData > org . jboss . as . clustering . web . DistributedCacheManager < T > getDistributedCacheManager ( LocalDistributableSessionManager manager ) throws ClusteringNotSupportedException { @ SuppressWarnings ( "unchecked" ) AdvancedCache < DistributedCacheManagerFactory . SessionKeyImpl , Map < Object , Object > > sessionCache = this . sessionCache . getValue ( ) . getAdvancedCache ( ) . with ( this . getClass ( ) . getClassLoader ( ) ) ; <START_BUG> if ( ! ( sessionCache . getConfiguration ( ) . isInvocationBatchingEnabled ( ) ) ) { <END_BUG> throw new ClusteringNotSupportedException ( InfinispanWebMessages . MESSAGES . failedToConfigureWebApp ( sessionCache . getCacheManager ( ) . getGlobalConfiguration ( ) . getCacheManagerName ( ) , sessionCache . getName ( ) ) ) ; } @ SuppressWarnings ( "unchecked" ) Cache < Address , String > jvmRouteCache = this . sessionCache . getValue ( ) ; BatchingManager batchingManager = new org . jboss . as . clustering . web . impl . TransactionBatchingManager ( sessionCache . getTransactionManager ( ) ) ; SessionAttributeStorage < T > storage = this . storageFactory . createStorage ( manager . getReplicationConfig ( ) . getReplicationGranularity ( ) , this . marshallerFactory . createMarshaller ( manager ) ) ; return new DistributedCacheManager < T , DistributedCacheManagerFactory . SessionKeyImpl > ( manager , new org . jboss . as . clustering . infinispan . atomic . AtomicMapCache < DistributedCacheManagerFactory . SessionKeyImpl , Object , Object > ( sessionCache ) , jvmRouteCache , this . lockManager . getValue ( ) , storage , batchingManager , new DistributedCacheManagerFactory . SessionKeyFactoryImpl ( manager ) , this . invoker ) ; } @ Override public boolean addDependencies ( ServiceTarget target , ServiceBuilder < ? > builder , JBossWebMetaData metaData ) { } @ SuppressWarnings ( "rawtypes" ) public Injector < Cache > getSessionCacheInjector ( ) { } @ SuppressWarnings ( "rawtypes" ) public Injector < Cache > getJvmRouteCacheInjector ( ) { } public void setSessionAttributeMarshallerFactory ( SessionAttributeMarshallerFactory marshallerFactory ) { } public void setSessionAttributeStorageFactory ( SessionAttributeStorageFactory storageFactory ) { } public void setCacheInvoker ( CacheInvoker invoker ) { } private static class SessionKeyFactoryImpl implements SessionKeyFactory < DistributedCacheManagerFactory . SessionKeyImpl > { private final LocalDistributableSessionManager manager ; public SessionKeyFactoryImpl ( LocalDistributableSessionManager manager ) { } @ Override public DistributedCacheManagerFactory . SessionKeyImpl createKey ( String sessionId ) { } @ Override public boolean ours ( DistributedCacheManagerFactory . SessionKeyImpl key ) { } } public static class SessionKeyImpl implements SessionKey { private static final long serialVersionUID = 398539176014850559L ; private final String application ; private final String sessionId ; private transient int hashCode ; public SessionKeyImpl ( String application , String sessionId ) { } @ Override public String getSessionId ( ) { } @ Override public boolean equals ( Object object ) { } @ Override public int hashCode ( ) { } private void computeHashCode ( ) { } @ Override public String toString ( ) { } private void readObject ( ObjectInputStream in ) throws IOException , ClassNotFoundException { } } }

Fix:
if ( ! ( sessionCache . getCacheConfiguration ( ) . invocationBatching ( ) . enabled ( ) ) ) {