public void testStatefulBean() throws Exception
{
// Connect to the server0 JNDI
InitialContext ctx = getInitialContext(0);
DisableClusteredAnnotationRemote stateful = null;
try
{
stateful = (DisableClusteredAnnotationRemote) ctx.lookup("DisableClusteredAnnotationStateful/remote");
}
catch (NameNotFoundException nnfe)
{
fail(nnfe.getMessage());
}
NodeAnswer node1 = stateful.getNodeState ();
getLog ().debug ("Node 1 ID: " +node1);
// Now we switch to the other node, simulating a failure on node 1
//
stateful.setUpFailover("once");
try
{
stateful.getNodeState ();
fail("GenericClusteringException did not propagate");
}
catch (Exception good) {}
}