4 Replies Latest reply on Feb 1, 2006 9:52 AM by stelang

    org.jboss.cache.lock.TimeoutException on using transaction

    stelang

      Hi,
      I am running 2 servlets using weblogic on the same m/c i.e. on 2 jvms. I am using the configuration file from the example http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheAndWebLogic
      with the only change being : org.jboss.cache.GenericTransactionManagerLookup
      The 1st servlet on getting the cache reference does the foll:
      while(true)
      {
      tx.begin();
      cache.put("root/resources", "count", "1");
      System.out.println("in txn :" + cache.get("root/resources"));
      Thread.sleep(15000);
      tx.commit();
      }

      The 2nd servlet has:
      while(true)
      {
      cache.put("root/resources", "count", "2");
      }

      On starting the 2 instances of weblogic server, I run the 1st servlet and when it starts the transaction, I run the 2nd servlet. I see this exception on running the 2nd servlet:
      org.jboss.cache.lock.TimeoutException: rsp=sender=127.0.0.1:4804, retval=null, received=fals
      at org.jboss.cache.TreeCache.callRemoteMethods(TreeCache.java:2205)
      at org.jboss.cache.TreeCache.callRemoteMethods(TreeCache.java:2227)
      at org.jboss.cache.interceptors.ReplicationInterceptor.handleReplicatedMethod(Replic
      at org.jboss.cache.interceptors.ReplicationInterceptor.invoke(ReplicationInterceptor
      at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:3116)
      at org.jboss.cache.TreeCache.put(TreeCache.java:1762)
      at org.jboss.cache.TreeCache.put(TreeCache.java:1702)
      at org.jboss.cache.example.servlet.ViewCacheContents.doGet(ViewCacheContents.java:72
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
      at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
      at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext
      at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359
      at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
      Is this a known issue? Is there any workaround for this issue? I see this only on using transaction. If I remove the transaction boundaries set in 1st servlet, everything works fine.Thanks in advance. Appreciate your help.