@Override public String getNameInNamespace() throws NamingException { return super.getNameInNamespace(); }
public JndiUtil(InitialContext initCtx, String root) throws NamingException { this.namespace = initCtx.getNameInNamespace(); this.root = root; this.context = (Context)initCtx.lookup(root); }
@Override public String getNameInNamespace() throws NamingException { String out; if (this.initialContext == null) { out = this.defaultInitCtx.getNameInNamespace(); } else { out = this.initialContext.getNameInNamespace(); } return out; }
@Override public String getNameInNamespace() throws NamingException { String out; if (this.initialContext == null) { out = this.defaultInitCtx.getNameInNamespace(); } else { out = this.initialContext.getNameInNamespace(); } return out; }
public void start() throws Exception { super.start(); try{ NonSerializableFactory.rebind(ctx, jndiName + PROXY_FACTORY_NAME, this); } catch (NamingException e) { NamingException namingException = new NamingException("Could not bind local producer factory with name " + factoryName + " into JNDI under jndiName: " + ctx.getNameInNamespace() + "/" + jndiName + PROXY_FACTORY_NAME); namingException.setRootCause(e); throw namingException; } }
@Override protected void discover() throws Exception { log("JNDI Context:"); try { InitialContext ctx = new InitialContext(); String path = ctx.getNameInNamespace(); toMap(ctx, path); } catch (NoInitialContextException ex) { log(" ##### No initial JNDI context found."); } }
@Override protected void discover() throws Exception { log("JNDI Context:"); try { InitialContext ctx = new InitialContext(); String path = ctx.getNameInNamespace(); toMap(ctx, path); } catch (NoInitialContextException ex) { log(" ##### No initial JNDI context found."); } }
public void start() throws Exception { InitialContext ctx1 = null; if (properties != null) { ctx1 = new InitialContext(properties); } else ctx1 = new InitialContext(); InitialContext ctx = ctx1; try { if (serializable) { Util.rebind(ctx, bindTo, target); } else { NonSerializableFactory.rebind(ctx, bindTo, target); } } catch (NamingException e) { NamingException namingException = new NamingException("Could not bind JndiBinder service into JNDI under jndiName:" + ctx.getNameInNamespace() + "/" + bindTo); namingException.setRootCause(e); throw namingException; } }
/** * {@inheritDoc} */ public String getNameInNamespace() throws NamingException { if (isInitialContextInitializerCall()) { return super.getNameInNamespace(); } return getContext().getNameInNamespace(); } }
Name contextName = parser.parse(context.getNameInNamespace()); Name baseName = parser.parse(userBase);
public void start() throws Exception { Dispatcher.singleton.registerTarget(jndiName + PROXY_FACTORY_NAME, this); Class[] interfaces = {ProxyFactory.class}; Object factoryProxy = Remoting.createPojiProxy(jndiName + PROXY_FACTORY_NAME, interfaces, ProxyRemotingUtils.getDefaultClientBinding()); try { Util.rebind(ctx, jndiName + PROXY_FACTORY_NAME, factoryProxy); } catch (NamingException e) { NamingException namingException = new NamingException("Could not bind remote producer factory into JNDI under jndiName: " + ctx.getNameInNamespace() + "/" + jndiName + PROXY_FACTORY_NAME); namingException.setRootCause(e); throw namingException; } super.start(); }