@Override protected Object resolveObject(Object obj) throws IOException { Object result = obj; try { if (obj instanceof SerializableObjectFactory) { return ((SerializableObjectFactory) obj).createObject(); } else { for (GlassFishInputStreamHandler handler : handlers) { Object r = handler.resolveObject(obj); if (r != null) { result = r == GlassFishInputStreamHandler.NULL_OBJECT ? null : r; break; } } return result; } } catch (IOException ioEx ) { _logger.log(Level.SEVERE, "ejb.resolve_object_exception", ioEx); throw ioEx; } catch (Exception ex) { _logger.log(Level.SEVERE, "ejb.resolve_object_exception", ex); IOException ioe = new IOException(); ioe.initCause(ex); throw ioe; } }
@Override public Object resolveObject(Object obj) throws IOException { // Until we've identified a remote object, we can't assume the orb is // available in the container. If the orb is not present, this will be null. ProtocolManager protocolMgr = getProtocolManager(); try { if ( (protocolMgr != null) && protocolMgr.isStub(obj) ) { protocolMgr.connectObject((Remote)obj); return obj; } else if (obj instanceof SerializableObjectFactory) { return ((SerializableObjectFactory) obj).createObject(); } else { return obj; } } catch (IOException ioEx ) { _ejbLogger.log(Level.SEVERE, "ejb.resolve_object_exception", ioEx); throw ioEx; } catch (Exception ex) { _ejbLogger.log(Level.SEVERE, "ejb.resolve_object_exception", ex); IOException ioe = new IOException(); ioe.initCause(ex); throw ioe; } }