try{
Context jndiContext = getInitialContext();
CabinHome c_home = (CabinHome)jndiContext.lookup("CabinHome");
EJBMetaData meta = c_home.getEJBMetaData();
System.out.println(meta.getHomeInterfaceClass().getName());
System.out.println(meta.getRemoteInterfaceClass().getName());
System.out.println(meta.getPrimaryKeyClass().getName());
System.out.println(meta.isSession());
CabinPK pk = (CabinPK)meta.getPrimaryKeyClass().newInstance();
pk.id = 1;
CabinHome c_home2 = (CabinHome)meta.getEJBHome();
Cabin cabin = c_home2.findByPrimaryKey(pk);
System.out.println(cabin.getName());
}catch(java.rmi.RemoteException re){re.printStackTrace();}
catch(javax.naming.NamingException ne)
{ne.printStackTrace();}
catch(Throwable t){t.printStackTrace();}