try
{
SessionAHome aHome = (SessionAHome)getInitialContext().lookup("eardeployment/SessionA");
SessionBHome bHome = (SessionBHome)getInitialContext().lookup("eardeployment/SessionB");
SessionA a = aHome.create();
SessionB b = bHome.create();
assertTrue("a call b failed!", a.callB());
assertTrue("b call a failed!", b.callA());
}
finally
{
undeploy("unpacked/eardeployment.ear");
}