/** * Return the servant for this IOR, if it is local AND if the OA that implements this objref supports direct access * to servants outside of an invocation. XXX revisit: do we want this at all? If we do, it might move to the * ObjectKeyTemplate instead. */ public java.lang.Object getServant() { if (!isLocal()) return null; RequestDispatcherRegistry scr = orb.getRequestDispatcherRegistry(); ObjectAdapterFactory oaf = scr.getObjectAdapterFactory(oktemp.getSubcontractId()); ObjectAdapterId oaid = oktemp.getObjectAdapterId(); ObjectAdapter oa = null; try { oa = oaf.find(oaid); } catch (SystemException exc) { // Could not find the OA, so just return null. This usually happens when POAs are being deleted, and the POA // always return null for getLocalServant anyway. wrapper.getLocalServantFailure(exc, oaid.toString()); return null; } byte[] boid = oid.getId(); java.lang.Object servant = oa.getLocalServant(boid); return servant; }
/** * Return the servant for this IOR, if it is local AND if the OA that implements this objref supports direct access * to servants outside of an invocation. XXX revisit: do we want this at all? If we do, it might move to the * ObjectKeyTemplate instead. */ public java.lang.Object getServant() { if (!isLocal()) return null; RequestDispatcherRegistry scr = orb.getRequestDispatcherRegistry(); ObjectAdapterFactory oaf = scr.getObjectAdapterFactory(oktemp.getSubcontractId()); ObjectAdapterId oaid = oktemp.getObjectAdapterId(); ObjectAdapter oa = null; try { oa = oaf.find(oaid); } catch (SystemException exc) { // Could not find the OA, so just return null. This usually happens when POAs are being deleted, and the POA // always return null for getLocalServant anyway. wrapper.getLocalServantFailure(exc, oaid.toString()); return null; } byte[] boid = oid.getId(); java.lang.Object servant = oa.getLocalServant(boid); return servant; }