[jboss-user] [JBossCache] - Performing cache operations while in a catch() section

dfraser do-not-reply at jboss.com
Wed Aug 1 18:17:11 EDT 2007


Hi all,

  the application I have written, when handling exceptions in one part, performs a cache operation (setting a node's value) to inform the other members of the cluster as to what is happening with a resource shared amongst the cluster.  

everything looks and acts fine, then a minute or two later after the dust has settled, a warning pops up in server.log

17:56:19,454 WARN  [TreeCache] status is 1 (not ACTIVE or PREPARING); returning null)
java.lang.Throwable
        at org.jboss.cache.TreeCache.getCurrentTransaction(TreeCache.java:5805)
        at org.jboss.cache.TreeCache.getCurrentTransaction(TreeCache.java:5775)
        at org.jboss.cache.TreeCache.put(TreeCache.java:3831)
        at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
        at $Proxy56.put(Unknown Source)
        at com.mec.management.mbeans.TreeCacheFacade.setValue(TreeCacheFacade.java:296)

[and so on]

there are a few of these - it seems every cache related operation done while handling an exception has problems.  there is a transaction timeout message before all this

17:55:17,034 WARN  [TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=xbod-app01.xb-online.com/37, BranchQual=, localId=37] timed out. status=STATUS_ACTIVE

the cache is in REPL_SYNC mode, but I don't know what else to say as I'm not sure what else is important

I am sensing that this general idea of using the cache to update information within catch() blocks is not a good idea.  I am lost as how to deal with this - is there some general principles I should follow or should I move the cache operation out of the exception handling all together (and how to?)?

yeah, they're only warnings but they look important.  If someone could possibly explain what is going on, I would greatly appreciate it

doug


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069830#4069830

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069830



More information about the jboss-user mailing list