return new InitialContext(env1);
}
public void test1() throws Exception
{
MyStateful stateful = (MyStateful) getInitialContext(0).lookup("MyStatefulBean/remote");
Person p = new Person("Brian");
stateful.save(p);
String expected = "Changing SFSB state";
stateful.setDescription(expected);
stateful.setUpFailover("once");
try
{
String actual = stateful.getDescription();
assertEquals(expected, actual);
}
catch(Exception e)
{
Throwable cause = e;
while(cause.getCause() != null) cause = cause.getCause();
throw (Exception) cause;
}
stateful.remove(p);
stateful.done();
}