/** * Tests if a given EJB is identical to the invoked EJB object. * @param obj - An object to test for identity with the invoked object. * @return True if the given EJB object is identical to the invoked object. * @throws EJBException Thrown when the method failed due to a system-level * failure. */ public boolean isIdentical(EJBLocalObject obj) { if (TraceEjb.isDebugIc()) { TraceEjb.interp.log(BasicLevel.DEBUG, ""); } boolean ret = false; if (obj != null) { // Get the home class name String homeClassName = getEJBLocalHome().getClass().getName(); String objHomeClassName = obj.getEJBLocalHome().getClass().getName(); // Tests the home equality and the primary key equality ret = ((objHomeClassName.equals(homeClassName)) && (obj.getPrimaryKey().equals(getPrimaryKey()))); } return ret; }