1 Reply Latest reply on Dec 14, 2005 8:24 PM by Sebastian Schmidt

    Problem with method call on cluster

    Sebastian Schmidt Newbie


      my problem is, that very often when i execute the following code:

      public void prepare(GlobalTransaction gtx, String[] groupNames, BatchReplication[] batchReplication){
       if(isDebug) log.debug("Begin Calling prepare");
       log2pc.info("coordinator begin_commit");
       Object args[] = {gtx, groupNames, batchReplication};
       Class classes[] = {GlobalTransaction.class, String[].class, BatchReplication[].class};
       long startTime = System.currentTimeMillis();
       ArrayList responseList = partition.callMethodOnCluster(ReplicatedCacheManager.RPC_HANDLE_NAME, "_rpc_runPrepare", args, classes, false);
       long endTime = System.currentTimeMillis();
       log.debug("Prepare Time\t" + (endTime-startTime));
       if (responsesOk(responseList,ReplicationStatus.SUCCESSFULLY_COMPLETED)){
       log2pc.info("coordinator commit");
       commit(gtx, groupNames);
       log2pc.info("coordinator abort");
       rollback(gtx, groupNames);
       log.debug("The list of responses from the other nodes are:");
       Iterator it = responseList.iterator();
       log.debug("Response = " + it.next());
       }catch(Exception e){
       log.debug("Exception caught in prepare() = " + e.getMessage());

      then only the coordinator (the one executing this) will receive the call and execute the method _rpc_runPrepare. Then, after 30 to 80 seconds all others will receive the call and execute it .
      How can that happen? I get this problem only in 3 out of 10 tries and without the problem the call takes less then 100 ms. I'm using JBoss 4.0.2 .
      Hope you can help me,


        • 1. Re: Problem with method call on cluster
          Sebastian Schmidt Newbie

          ok, i further investigated the problem. it seems that it only happens, when the message is bigger than 8192 bytes and gets fragmented. this also happens with jboss code.

          for example:

          when i do 1500 updates on clustered entity beans inside one transactions, than the same long method call on the cluster happens for the invalidation framework.

          so i guess it's not a problem of the code i'm using, but a problem of jgroups. any suggestions? maybe someone is using the invalidation framework for clustered entity beans and encountered the same problems??