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
JBoss Cluster
最新推荐文章于 2022-09-21 16:02:26 发布