This example illustrates use of an HA aware Router used to forward high level requests to replication nodes implemented by
Utility class to begin and commit/abort a transaction and handle exceptions according to this application's policies.
This example illustrates the use of a simple HA-unaware router that is used in conjunction with
The most basic demonstration of a replicated application.
This example is a small variation on the basic
There are three versions of the example which illustrate different application designs and aspects of JE functionality. Please be sure to walk through the three examples in the order listed below, since the information in one example builds on the one before it. The javadoc description for each class describes the example and explains how to run it. More detailed information is found in the example source code.
StockQuotes: This example is the most basic demonstration of a replicated application. It's intended to help gain an understanding of basic HA concepts and demonstrate use of the HA APIs to create a replicated environment and issue read and write transactions.
HARouter: This example is based on
StockQuotesand illustrates use of an HA-aware router (implemented by
HARouter), in conjunction with the
Monitorclass, to direct application requests, based upon the type of request (read or write) and the state (Master or Replica) of a node in the replication group. This example is meant to illustrate how a software load balancer might be integrated with JE HA, where
HARouterplays the role of the load balancer for purposes of the example.
SimpleRouter: This example is based on
RouterDrivenStockQuotesand illustrates use of an HA unaware router (implemented by
SimpleRouter), that load balances requests (both read and write) across all the nodes in a replication group. This example is meant to illustrate how a load balancer appliance might fit into the JE HA architecture, where
SimpleRouterplays the role of the load balancer appliance for purposes of the example.
a minor variation to the basic
example is also included in this package. It's intended to help illustrate how
RMI could be used to forward write requests from a Replica to the Master.
Copyright (c) 2004, 2013 Oracle and/or its affiliates. All rights reserved.