[JBossCache] - Re: Data integrity in a clustered jboss cache
by itchy75
I am already using REPL_SYNC and I have already tested the transaction manager as you said.
But I have a lot of time out out exception when I use SERIALIZABLE isolation level (Fail to acquire lock after 15000ms). So it doesn't work in cluster.
The problem is that I have a very high load on the two servers. When I run 100 requests (50 par servers) the first requests end well but after 10 requests everything is broken.
I try to implement the solution with REPEATABLE_READ and a retry policy. I tested it in one server and it works well, but in a cluster it doesn't work.
There is always a Thread that want to modify the value in cache, so all Threads have errors and last thread must wait a very long time before acquiring (and commiting) the value in cache. I tried o reduce lock acquisition timeout but with a big number of thread, it doesn't really change anything.
Does Jboss Cache in cluster support concurency on a very high load ?
The configuration of the cache
|
| <server>
| <mbean code="org.jboss.cache.TreeCache"
| name="Billetel.cache:service=ConcurencyTreeCache" >
|
| <!-- Used inside JBoss AS -->
| <depends>jboss:service=Naming</depends>
| <depends>jboss:service=TransactionManager</depends>
|
| <!--getTransactionManagerLookupClass
| Configure the TransactionManager
| -->
| <!-- Configure the TransactionManager -->
| <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
|
| <!--
| Node locking scheme:
| OPTIMISTIC
| PESSIMISTIC (default)
| -->
| <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
|
| <!--
| Note that this attribute is IGNORED if your NodeLockingScheme above is OPTIMISTIC.
|
| Isolation level : SERIALIZABLE
| REPEATABLE_READ (default)
| READ_COMMITTED
| READ_UNCOMMITTED
| NONE
| -->
| <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
|
| <!--
| Valid modes are LOCAL
| REPL_ASYNC
| REPL_SYNC
| INVALIDATION_ASYNC
| INVALIDATION_SYNC
| -->
| <attribute name="CacheMode">REPL_SYNC</attribute>
|
|
| <!--
| Just used for async repl: use a replication queue
| -->
| <attribute name="UseReplQueue">false</attribute>
|
| <!--
| Replication interval for replication queue (in ms)
| -->
| <attribute name="ReplQueueInterval">100</attribute>
|
| <!--
| Max number of elements which trigger replication
| -->
| <attribute name="ReplQueueMaxElements">1</attribute>
|
| <!-- Name of cluster. Needs to be the same for all clusters, in order
| to find each other
| -->
| <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}</attribute>
|
| <attribute name="ClusterConfig">
| <Config>
| <UDP mcast_addr="${jboss.cachecluster.udpGroup:228.1.2.41}"
| mcast_port="${jboss.cachecluster.mcast_port:47566}"
| ip_ttl="${jgroups.cachecluster.mcast.ip_ttl:0}"
| ip_mcast="true" mcast_send_buf_size="800000"
| mcast_recv_buf_size="150000" ucast_send_buf_size="800000"
| ucast_recv_buf_size="150000" loopback="false" />
| <PING timeout="2000" num_initial_members="3"
| up_thread="true" down_thread="true" />
| <MERGE2 min_interval="10000" max_interval="20000" />
| <FD_SOCK down_thread="false" up_thread="false" />
| <FD shun="true" up_thread="true" down_thread="true"
| timeout="2500" max_tries="5" />
| <VERIFY_SUSPECT timeout="3000" num_msgs="3"
| up_thread="true" down_thread="true" />
| <pbcast.NAKACK gc_lag="50"
| retransmit_timeout="300,600,1200,2400,4800" max_xmit_size="8192"
| up_thread="true" down_thread="true" />
| <UNICAST timeout="300,600,1200,2400,4800"
| window_size="100" min_threshold="10" down_thread="true" />
| <pbcast.STABLE desired_avg_gossip="20000"
| max_bytes="400000" up_thread="true" down_thread="true" />
| <FRAG frag_size="8192" down_thread="true"
| up_thread="true" />
| <pbcast.GMS join_timeout="5000"
| join_retry_timeout="2000" shun="true" print_local_addr="true" />
| <pbcast.STATE_TRANSFER up_thread="true"
| down_thread="true" />
| </Config>
| </attribute>
|
|
| <!--
| Whether or not to fetch state on joining a cluster
| NOTE this used to be called FetchStateOnStartup and has been renamed to be more descriptive.
| -->
| <attribute name="FetchInMemoryState">true</attribute>
|
| <!--
| The max amount of time (in milliseconds) we wait until the
| initial state (ie. the contents of the cache) are retrieved from
| existing members in a clustered environment
| -->
| <attribute name="InitialStateRetrievalTimeout">30000</attribute>
|
| <!--
| Number of milliseconds to wait until all responses for a
| synchronous call have been received.s
| -->
| <attribute name="SyncReplTimeout">15000</attribute>
|
| <!-- Max number of milliseconds to wait for a lock acquisition -->
| <attribute name="LockAcquisitionTimeout">5000</attribute>
|
| <!-- Specific eviction policy configurations. This is LRU -->
| <attribute name="EvictionPolicyConfig">
| <config>
| <attribute name="wakeUpIntervalSeconds">5</attribute>
| <!-- Cache wide default -->
| <region name="/_default_" policyClass="org.jboss.cache.eviction.LRUPolicy">
| <attribute name="timeToLiveSeconds">1800</attribute>
| </region>
| <region name="/reservationConcurency/" policyClass="org.jboss.cache.eviction.LRUPolicy">
| <attribute name="timeToLiveSeconds">0</attribute>
| </region>
| </config>
| </attribute>
|
| <attribute name="CacheLoaderConfiguration">
| <config>
|
| <!-- if passivation is true, only the first cache loader is used; the rest are ignored -->
| <passivation>false</passivation>
|
| <!-- comma delimited FQNs to preload -->
| <preload>/</preload>
|
| <!-- are the cache loaders shared in a cluster? -->
| <shared>true</shared>
|
| <!-- we can now have multiple cache loaders, which get chained -->
| <!-- the 'cacheloader' element may be repeated -->
| <cacheloader>
| <class>org.jboss.cache.loader.ClusteredCacheLoader</class>
|
| <!-- same as the old CacheLoaderConfig attribute -->
| <properties>
| timeout=60000
| </properties>
|
| <async>false</async>
|
| <!-- only one cache loader in the chain may set fetchPersistentState to true. An exception is thrown if more than one cache loader sets this to true. -->
| <fetchPersistentState>false</fetchPersistentState>
|
| <!-- determines whether this cache loader ignores writes - defaults to false. -->
| <ignoreModifications>false</ignoreModifications>
|
| <!-- if set to true, purges the contents of this cache loader when the cache starts up. Defaults to false. -->
| <purgeOnStartup>true</purgeOnStartup>
| </cacheloader>
|
| </config>
| </attribute>
| </mbean>
|
| </server>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071288#4071288
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071288
18Â years, 8Â months
[JBoss Seam] - Re: Marking Hibernate POJO's as entities without annotations
by IGx89
anonymous wrote : java.lang.IllegalArgumentException: Not an entity class: com.fl.bpm_ui.hibernate.reveng.ProjectEventReason
| at org.jboss.seam.Entity.forClass(Entity.java:190)
| at org.jboss.seam.security.Identity.checkEntityPermission(Identity.java:661)
| at org.jboss.seam.security.HibernateSecurityInterceptor.onLoad(HibernateSecurityInterceptor.java:35)
| at org.hibernate.event.def.DefaultPreLoadEventListener.onPreLoad(DefaultPreLoadEventListener.java:18)
| at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:125)
| at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:854)
| at org.hibernate.loader.Loader.doQuery(Loader.java:729)
| at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
| at org.hibernate.loader.Loader.doList(Loader.java:2220)
| at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
| at org.hibernate.loader.Loader.list(Loader.java:2099)
| at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
| at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
| at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
| at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
| at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
| at com.fl.bpm_ui.scheduler.CallManager.getPossibleReasons(CallManager.java:65)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
| at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.persistence.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:43)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.bpm.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:49)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
| at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
| at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
| at com.fl.bpm_ui.scheduler.CallManager_$$_javassist_0.getPossibleReasons(CallManager_$$_javassist_0.java)
| at com.fl.bpm_ui.scheduler.InitialCall.initCallReasonList(InitialCall.java:49)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
| at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.bpm.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:49)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
| at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
| at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
| at com.fl.bpm_ui.scheduler.InitialCall_$$_javassist_1.initCallReasonList(InitialCall_$$_javassist_1.java)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:124)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1957)
| at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1809)
| at org.jboss.seam.Component.getInstance(Component.java:1746)
| at org.jboss.seam.Component.getInstance(Component.java:1723)
| at org.jboss.seam.Component.getInstance(Component.java:1717)
| at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:60)
| at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:135)
| at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
| at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
| at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
| at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
| at javax.faces.component.UISelectItems.getValue(UISelectItems.java:130)
| at org.jboss.seam.ui.component.UISelectItems.getValue(UISelectItems.java:95)
| at com.sun.faces.renderkit.RenderKitUtils.getSelectItems(RenderKitUtils.java:323)
| at com.sun.faces.renderkit.html_basic.MenuRenderer.getOptionNumber(MenuRenderer.java:675)
| at com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:793)
| at com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:335)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:833)
| at org.jboss.seam.ui.util.cdk.RendererBase.renderChild(RendererBase.java:190)
| at org.jboss.seam.ui.util.cdk.RendererBase.renderChildren(RendererBase.java:166)
| at org.jboss.seam.ui.renderkit.ValidateAllRendererBase.doEncodeChildren(ValidateAllRendererBase.java:33)
| at org.jboss.seam.ui.util.cdk.RendererBase.encodeChildren(RendererBase.java:92)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
| at org.jboss.seam.ui.util.cdk.RendererBase.renderChild(RendererBase.java:186)
| at org.jboss.seam.ui.util.cdk.RendererBase.renderChildren(RendererBase.java:166)
| at org.jboss.seam.ui.renderkit.DecorateRendererBase.doEncodeChildren(DecorateRendererBase.java:94)
| at org.jboss.seam.ui.util.cdk.RendererBase.encodeChildren(RendererBase.java:92)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
| at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:577)
| at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
| at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:87)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:46)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:40)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:63)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:140)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
| at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
| at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
| at java.lang.Thread.run(Unknown Source)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071285#4071285
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071285
18Â years, 8Â months