-
15. Re: Timeout Exception when using EJB Infinispan cache
arnab_ghosh Mar 1, 2016 12:21 AM (in response to arnab_ghosh)Please let me know the available passivation options ?
file-passivation-store seems to be deprecated, so should I fall back to infinispan cache ?
<cache-container name="ejb" default-cache="passivation" module="org.wildfly.clustering.ejb.infinispan" aliases="sfsb" statistics-enabled="true">
<local-cache name="passivation" batching="true" statistics-enabled="true" >
<file-store passivation="true" purge="true" />
</local-cache>
Eviction can be disabled in inifinispan configuration, not sure how to disable the expiration.
Please let me know.
-
16. Re: Timeout Exception when using EJB Infinispan cache
pferraro Mar 2, 2016 10:01 AM (in response to arnab_ghosh)standalone.xml already contains passivation configuration - though it is not enabled by default.
e.g.
<caches> <cache name="simple"/> <cache name="distributable" passivation-store-ref="infinispan"/> </caches> <passivation-stores> <passivation-store name="infinispan" cache-container="ejb" max-size="10000"/> </passivation-stores>
To use a passivating cache, you can either
- Make it the default, via:
<stateful default-access-timeout="5000" cache-ref="distributable" passivation-disabled-cache-ref="simple"/>
- Configure specific beans for passivation via @org.jboss.ejb3.annotation.Cache("distributable")
As far as configuring passivation, you can adjust the max-size, which sets an upper limit on the number of bean instances that will remain in memory before the oldest are passivated.
-
17. Re: Timeout Exception when using EJB Infinispan cache
arnab_ghosh Mar 2, 2016 11:12 AM (in response to pferraro)pferraro Thanks for your reply.
I was using the distributable cache before with below configuration:
<session-bean> <stateful default-access-timeout="5000" cache-ref="distributable"/> </session-bean> <caches> <cache name="distributable" passivation-store-ref="infinispan" aliases="passivating clustered"/> </caches> <passivation-stores> <passivation-store name="infinispan" cache-container="ejb" max-size="10000"/> </passivation-stores> <subsystem xmlns="urn:jboss:domain:infinispan:2.0"> <cache-container name="ejb" default-cache="passivation" module="org.wildfly.clustering.ejb.infinispan" aliases="sfsb" statistics-enabled="true"> <local-cache name="passivation" batching="true" statistics-enabled="true" > <file-store passivation="true" purge="true" /> <eviction strategy="LRU" max-entries="10000"/> <expiration max-idle="600000" lifespan="900000"/> </local-cache> <local-cache name="persistent" batching="true"> <file-store passivation="false" purge="false"/> </local-cache> </cache-container> </subsystem>
While testing the system I was getting infinispan timeout exceptions which I mentioned in my earlier post in this same thread.
Is the eviction and expiration setting causing the issue ? Please let me know.
-
18. Re: Timeout Exception when using EJB Infinispan cache
pferraro Mar 3, 2016 11:46 AM (in response to arnab_ghosh)Your "passivation" cache should not attempt to configure eviction nor expiration. SFSB timeout and passivation are not handled by Infinispan directly, but rather by the distributed SFSB code. There are a couple reasons why this is problematic:
- WildFly uses multiple cache entries to store a given SFSB instance - thus these entries need to passivate/expire together.
- Infinispan does not implement notifications when a passivated cache entry expires.
-
19. Re: Timeout Exception when using EJB Infinispan cache
arnab_ghosh Mar 11, 2016 9:25 AM (in response to pferraro)pferraro Thanks for the reply. After your suggestion I will now move to the below configuration:
<session-bean>
<stateful default-access-timeout="5000" cache-ref="distributable"/>
</session-bean>
<caches>
<cache name="distributable" passivation-store-ref="infinispan" aliases="passivating clustered"/>
</caches>
<passivation-stores>
<passivation-store name="infinispan" cache-container="ejb" max-size="10000"/>
</passivation-stores>
<subsystem xmlns="urn:jboss:domain:infinispan:2.0">
<cache-container name="ejb" default-cache="passivation" module="org.wildfly.clustering.ejb.infinispan" aliases="sfsb" statistics-enabled="true">
<local-cache name="passivation" batching="true" statistics-enabled="true" >
<file-store passivation="true" purge="true" />
</local-cache>
<local-cache name="persistent" batching="true">
<file-store passivation="false" purge="false"/>
</local-cache>
</cache-container>
</subsystem>
-
20. Re: Timeout Exception when using EJB Infinispan cache
arnab_ghosh Mar 14, 2016 11:28 AM (in response to arnab_ghosh)After putting the above configuration I am seeing the below exception:
pproved:false,clipNotApproved:false,noReleaseDate:false,sortBy:0,selectedMaintenanceGroups:,selectedOwners:,fromDateFld:,toDateFld:
2016-03-14 10:54:10,592 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (default task-41) ISPN000136: Execution error: java.lang.IllegalStateException: Transaction DummyTransaction{xid=DummyXid{id=60893}, status=3} is not in a valid state to be invoking cache operations on.
at org.infinispan.interceptors.TxInterceptor.enlist(TxInterceptor.java:275)
at org.infinispan.interceptors.TxInterceptor.enlistIfNeeded(TxInterceptor.java:231)
at org.infinispan.interceptors.TxInterceptor.enlistReadAndInvokeNext(TxInterceptor.java:225)
at org.infinispan.interceptors.TxInterceptor.visitGetKeyValueCommand(TxInterceptor.java:221)
at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at org.infinispan.interceptors.CacheMgmtInterceptor.visitGetKeyValueCommand(CacheMgmtInterceptor.java:92)
at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:110)
at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:73)
at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:74)
at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:66)
at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:74)
at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:333)
at org.infinispan.CacheImpl.get(CacheImpl.java:377)
at org.infinispan.DecoratedCache.get(DecoratedCache.java:396)
at org.infinispan.AbstractDelegatingCache.get(AbstractDelegatingCache.java:271)
at org.jboss.as.clustering.infinispan.invoker.Locator$FindOperation.invoke(Locator.java:54)
at org.jboss.as.clustering.infinispan.invoker.Locator$LockingFindOperation.invoke(Locator.java:71)
at org.jboss.as.clustering.infinispan.invoker.SimpleCacheInvoker.invoke(SimpleCacheInvoker.java:34)
at org.jboss.as.clustering.infinispan.invoker.RetryingCacheInvoker.invoke(RetryingCacheInvoker.java:87)
at org.wildfly.clustering.ejb.infinispan.bean.InfinispanBeanFactory.findValue(InfinispanBeanFactory.java:89)
at org.wildfly.clustering.ejb.infinispan.bean.InfinispanBeanFactory.findValue(InfinispanBeanFactory.java:53)
at org.wildfly.clustering.ejb.infinispan.InfinispanBeanManager.findBean(InfinispanBeanManager.java:191)
at org.jboss.as.ejb3.cache.distributable.DistributableCache.discard(DistributableCache.java:160) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.as.ejb3.component.stateful.StatefulSessionComponentInstance.discard(StatefulSessionComponentInstance.java:155) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.as.ejb3.component.stateful.StatefulComponentInstanceInterceptor.processInvocation(StatefulComponentInstanceInterceptor.java:79) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInNoTx(CMTTxInterceptor.java:260) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.notSupported(CMTTxInterceptor.java:324) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:237) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:95) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:448)
at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)
at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:185)
at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:182)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:73)
at com.sonymusic.aoma.service.ejb.entityfacade.local.ProductFacadeLocal$$$view256.getFilteredProducts(Unknown Source) [aoma.service.local.jar:]
at com.sonymusic.aoma.mobile.actions.MobileAudioListAction.doAction(MobileAudioListAction.java:121) [aoma.jar:]
at com.sonymusic.aoma.dispatcher.actions.SimpleDispatcherAction.executeAction(SimpleDispatcherAction.java:440) [aoma.jar:]
at com.sonymusic.aoma.AOMADispatcherServlet$DispatcherAction.execute(AOMADispatcherServlet.java:267) [aoma.jar:]
at com.sonymusic.aoma.AOMADispatcherServlet.service(AOMADispatcherServlet.java:80) [aoma.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63)
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70)
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
Any idea what I am doing wrong ?
When the server is starting up I am also seeing the below in the logs:
2016-03-14 11:19:36,084 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 73) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
2016-03-14 11:19:36,085 INFO [org.infinispan.factories.GlobalComponentRegistry] (ServerService Thread Pool -- 72) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.2.Final
2016-03-14 11:19:36,093 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 73) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
2016-03-14 11:19:36,094 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (MSC service thread 1-7) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
2016-03-14 11:19:36,094 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (MSC service thread 1-7) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
2016-03-14 11:19:36,369 INFO [org.infinispan.jmx.CacheJmxRegistration] (ServerService Thread Pool -- 73) ISPN000031: MBeans were successfully registered to the platform MBean server.
2016-03-14 11:19:36,372 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 73) JBAS010281: Started aoma.ear/aoma.service.local.jar cache from ejb container