JBoss Cluster

JBoss Cluster can support Loadbalance and failover.


Failover cannot avoid errors completely. For getArrayDataFromActive API, there is only one remote method call. But failover only works between the remote method calls (after the first remote method call is finished successfully and before the second remote method request is sent out). On this basis, the error must occur when getArrayDataFromActive is in the middle of processing in the server which is shutting down. For TT_RUN, invoking remote method time is much less than client program running time, so the chance to error out is very slim.


We did not get some JBoss official docs to describe it, but get some useful material on the internet to support our opinion:

It mentioned that “Remind that when I defined ‘ failover’ , I defined a condition for when the failover will happen: ‘ between the method calls’ . It means if you have two successive methods to a remote object, the failover will only happen after the first method call is finished successfully and before the second method request is sent out.”

So, what will happen if the remote server fails when the methods are in the middle of processing in the server? The answer is: the process will stop and the client will see error messages in most cases…”

For more details, please search “Failover can avoid errors completely. – Negative” in below link:

http://www.theserverside.com/news/1364410/Under-the-Hood-of-J2EE-Clustering


Reproduce Steps:

1.       Start the cluster environment (2 JBoss server instances).
2.     Open 8 TT_RUN forms in SO, then run them one by one.
3.     Shut down one JBoss server instance; the error occurred.

Error message:

Transaction ID = null
TBomManager.saveConsumptionSet(...)(...)
Service unavailable for -1179173723 calling method public abstract com.datasweep.plantops.common.dataobjects.DConsumptionSetReturnData com.datasweep.plantops.common.services.ObjectStorage.saveConsumptionSet(com.datasweep.plantops.common.dataobjects.DConsumptionSet,com.datasweep.plantops.common.dataobjects.DTimestamp,java.lang.String,short,com.datasweep.plantops.common.dataobjects.DTrxInfo) throws com.datasweep.plantops.common.exceptions.DatasweepServerException,java.rmi.RemoteException

StackTrace
org.jboss.invocation.ServiceUnavailableException: Service unavailable for -1179173723 calling method public abstract com.datasweep.plantops.common.dataobjects.DConsumptionSetReturnData com.datasweep.plantops.common.services.ObjectStorage.saveConsumptionSet(com.datasweep.plantops.common.dataobjects.DConsumptionSet,com.datasweep.plantops.common.dataobjects.DTimestamp,java.lang.String,short,com.datasweep.plantops.common.dataobjects.DTrxInfo) throws com.datasweep.plantops.common.exceptions.DatasweepServerException,java.rmi.RemoteException

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值