public Object resolveObject(Object obj) throws IOException { Object result = obj; if (obj instanceof SerializableJNDIContext) { SerializableJNDIContext sctx = (SerializableJNDIContext) obj; try { String name = sctx.getName(); if ((name == null) || (name.length() == 0)) { result = new InitialContext(); } else { result = gfNM.restoreJavaCompEnvContext(name); } } catch (NamingException namEx) { IOException ioe = new IOException(); ioe.initCause(namEx); throw ioe; } } return result; }
public Object createObject() throws IOException { try { if ((name == null) || (name.length() == 0)) { return new InitialContext(); } else { return Globals.getDefaultHabitat().<GlassfishNamingManager>getService(GlassfishNamingManager.class).restoreJavaCompEnvContext(name); } } catch (NamingException namEx) { IOException ioe = new IOException(); ioe.initCause(namEx); throw ioe; } }
public Object createObject() throws IOException { try { if ((name == null) || (name.length() == 0)) { return new InitialContext(); } else { return Globals.getDefaultHabitat() .<GlassfishNamingManager>getService(GlassfishNamingManager.class) .restoreJavaCompEnvContext(name); } } catch (NamingException namEx) { IOException ioe = new IOException(); ioe.initCause(namEx); throw ioe; } }
public Object resolveObject(Object obj) throws IOException { Object result = obj; if (obj instanceof SerializableJNDIContext) { SerializableJNDIContext sctx = (SerializableJNDIContext) obj; try { String name = sctx.getName(); if ((name == null) || (name.length() == 0)) { result = new InitialContext(); } else { result = gfNM.restoreJavaCompEnvContext(name); } } catch (NamingException namEx) { IOException ioe = new IOException(); ioe.initCause(namEx); throw ioe; } } return result; }
public Object createObject() throws IOException { try { if ((name == null) || (name.length() == 0)) { return new InitialContext(); } else { return Globals.getDefaultHabitat().getComponent(GlassfishNamingManager.class).restoreJavaCompEnvContext(name); } } catch (NamingException namEx) { IOException ioe = new IOException(); ioe.initCause(namEx); throw ioe; } }