public void testRemoveSessionObject ()
throws Exception
{
getLog().debug("+++ testRemoveSessionObject()");
Context ctx = new InitialContext();
StatefulSessionHome home = ( StatefulSessionHome ) ctx.lookup("ejbcts/StatefulSessionBean");
StatefulSession bean = home.create("testRemoveSessionObject");
getLog().debug("OK, bean="+bean);
getLog().debug("Call remove using a primary key");
try
{
home.remove(new AccountPK("pk"));
fail("[EJB 1.1, p42, section 5.3.2] Expected 'RemoveException' when remove-ing a session object, got NO exception");
}
catch(RemoveException e)
{
getLog().debug("Remove using a primary key failed as expected");