@Override public boolean equals(final Object obj) { return super.equals(obj); }
@Override public int hashCode() { return super.hashCode(); }
/** * Return a stub of {@link EJBObject} wrapped with its CMIReference. * @param proxy a CMI proxy * @param method a create (or find) method * @param args method arguments * @return a wrapper containing a stub of EJBObject and its CMIReference * @throws Throwable if the stub cannot be downloaded */ public CMIReferenceableWrapper<EJBObject> getWrappedEJBObject( final Object proxy, final Method method, final Object... args) throws Throwable { // Get a stub of EJBObject EJBObject ejbObject = (EJBObject) super.invokeRemoteMethod(proxy, method, args); // Wrap it with its associated CMIReference return new CMIReferenceableWrapper<EJBObject>(getCurrentRef().getReference(), ejbObject); }
/** * Sets the given clue on the given instance. * If no clue is used, this method shouldn't do anything * @param cmiReferenceable the instance to be updated with the clue * @param cmiRef the given clue * @throws PoolException if clue can't be set */ public void setClue(final CMIReferenceable<?> cmiReferenceable, final CMIReference cmiRef) throws PoolException { if (!(cmiReferenceable instanceof CMIReferenceableWrapper)) { throw new PoolException("Cannot set the given clue on the instance"); } // Update the reference ((CMIReferenceableWrapper<?>) cmiReferenceable).setReference(cmiRef); }
return new RemoteIIOPCMIReferenceableWrapper<Remote>(cmiReference, (Remote) object); } else { return new CMIReferenceableWrapper<Object>(cmiReference, object);
return new RemoteIIOPCMIReferenceableWrapper<EJBObject>(cmiReference, (EJBObject) ejbObject); } else { return new CMIReferenceableWrapper<EJBObject>(cmiReference, (EJBObject) ejbObject);