try{
Context jndiContext = getInitialContext();
CabinHome c_home = (CabinHome)jndiContext.lookup("CabinHome");
CabinPK pk = new CabinPK();
pk.id = 101;
Cabin cabin = c_home.findByPrimaryKey(pk);
cabin.remove();
}catch(java.rmi.RemoteException re){re.printStackTrace();}
catch(javax.naming.NamingException ne)
{ne.printStackTrace();}
catch(Throwable t){t.printStackTrace();}