VisiBroker for C++ Developer’s Guide : Using the VisiNaming Service : Configuring VisiNaming with JdataStore HA : Run the VisiNaming Explicit Clustering example : 6 Start Client with the following command:

6
Client -ORBInitRef NameService=<nsIOR>
7
To verify the minimum requirement of one Primary and two Read-only mirrors, complete the following steps:
1
2
Note that the behavior is the same as in the previous procedure.
3
4
Note that Client begins to raise a BAD_PARAM exception. This is as expected because a failover requires that at least two read-only mirrors are available.
5
This restores the original configuration, with three Read-only mirrors.
To verify the autofailover of JDatastore HA, complete the following steps:
1
Note that one of the Read-only mirrors has been promoted to Primary mirror.
2
Note that Client begins to raise a BAD_PARAM exception because a failover requires that at least two read-only mirrors are available.
3
Note that this was previously configured for Primary mirror.
4
Note that Mirror1 is now configured as Read-only mirror. You can check this from the JDS Server Console by making a datasource connection to the Directory mirror that the Naming Service uses.
Run the VisiNaming Naming Failover example
Run the following example to observe the failover capability of the VisiNaming service.
Note
Before using this procedure, create a JDataStore HA with one Primary mirror at port 1111, three Read-only mirrors at ports 1112, 1113, 1114 and two Directory mirrors at ports 1115 and 1116.
1
osagent
2
# Naming
vbroker.naming.backingStoreType=JDBC
vbroker.naming.poolSize=5
vbroker.naming.jdbcDriver=com.borland.datastore.jdbc.
               DataStoreDriver
vbroker.naming.loginName=SYSDBA
vbroker.naming.loginPwd=masterkey
vbroker.naming.traceOn=0
vbroker.naming.jdsSvrPort=1115
#vbroker.naming.logLevel=debug
#default value of enableslave is 0. '1' Indicates
 #cluster or master-slave configuration
vbroker.naming.enableSlave=1
#indicate master-slave configuration
vbroker.naming.slaveMode=slave
vbroker.naming.masterHost=143.186.141.14
vbroker.naming.masterPort=12372
vbroker.naming.masterServer=Master
vbroker.naming.slaveHost=143.186.141.14
vbroker.naming.slavePort=12373
vbroker.naming.slaveServer=Slave
3
JdsServer.exe -port=1111
JdsServer.exe -port=1112
JdsServer.exe -port=1113
JdsServer.exe -port=1114
JdsServer.exe -port=1115
JdsServer.exe -port=1116
4
nameServ -VBJclasspath <JDS_Install>\lib\
jdsserver.jar -config autofailover.properties -VJprop vbroker.naming.url=jdbc:borland:dsremote:// 143.186.141.12 AutoFailover_Mirror 5.jds
VBJprop vbroker.se.iiop_tp.scm.iiop_tp.listener.port=12372 Master
5
nameserv –VBJclasspath <JDS_Install>\lib\
jdsserver.jar –config autofailover.properties -VBJprop
vbroker.naming.url=jdbc:borland:dsremote://143.186.141.14/AutoFailover_Mirror6.jds
-VBJprop vbroker.se.iiop_tp.scm.iiop_tp.listener.port=12373 –VBJprop vbroker.naming.jdsSvrPort=1116 Slave
6
Server -ORBInitRef NameService=<Master Server IOR>
7
NamingClient -ORBInitRef NameService=<Master Server IOR>
8
Note that the balance returns a value.
9
Note that the balance returns a value.
10
Note that the balance returns a value
To see how two Directory mirrors handle a single point of failure, complete the following steps:
1
2
The CannotProceed exception is raised, which is the expected behavior.
3
Note that the balance will return a value. Once it can return a value, you can observe that it is using the Directory mirror that is listening on port 1117.
4
Note that the balance returns a value for three times.
To see how autofailover functions with two Directory mirrors, complete the following steps:
1
2
3
The CannotProceed exception is raised several times before it starts returning a value. Once it returns a value, you can see that one of the mirrors is promoted to be a Primary mirror. This can only be viewed using the JDS Server Console.