private void rebind() throws NamingException, SchedulerException { InitialContext rootCtx = null; try { rootCtx = new InitialContext(); Name fullName = rootCtx.getNameParser("").parse(jndiName); Scheduler scheduler = schedulerFactory.getScheduler(); NonSerializableFactory.rebind(fullName, scheduler, true); } finally { if (rootCtx != null) { try { rootCtx.close(); } catch (NamingException ignore) {} } } }
private void rebind() throws NamingException, SchedulerException { InitialContext rootCtx = null; try { rootCtx = new InitialContext(); Name fullName = rootCtx.getNameParser("").parse(jndiName); Scheduler scheduler = schedulerFactory.getScheduler(); NonSerializableFactory.rebind(fullName, scheduler, true); } finally { if (rootCtx != null) { try { rootCtx.close(); } catch (NamingException ignore) {} } } }
/** * (non-Javadoc) * * @see javax.naming.InitialContext#getNameParser(java.lang.String) */ @Override public NameParser getNameParser(String name) throws NamingException { NameParser out; if (this.initialContext == null) { out = this.defaultInitCtx.getNameParser(name); } else { out = this.initialContext.getNameParser(name); } return out; }
/** * (non-Javadoc) * * @see javax.naming.InitialContext#getNameParser(javax.naming.Name) */ @Override public NameParser getNameParser(Name name) throws NamingException { NameParser out; if (this.initialContext == null) { out = this.defaultInitCtx.getNameParser(name); } else { out = this.initialContext.getNameParser(name); } return out; }
/** * (non-Javadoc) * * @see javax.naming.InitialContext#getNameParser(java.lang.String) */ @Override public NameParser getNameParser(String name) throws NamingException { NameParser out; if (this.initialContext == null) { out = this.defaultInitCtx.getNameParser(name); } else { out = this.initialContext.getNameParser(name); } return out; }
public static Object lookup(Object scope, String jndiName) throws NamingException { Name scopeName = getNameForScope(scope); InitialContext ic = new InitialContext(); NameParser parser = ic.getNameParser(""); scopeName.addAll(parser.parse(jndiName)); return ic.lookup(scopeName); }
public static Context getContextForScope(Object scope) throws NamingException { InitialContext ic = new InitialContext(); NameParser parser = ic.getNameParser(""); Name name = parser.parse(""); if (scope != null) { name.add(canonicalizeScope(scope)); } return (Context)ic.lookup(name); }
public static Object lookup(Object scope, String jndiName) throws NamingException { Name scopeName = getNameForScope(scope); InitialContext ic = new InitialContext(); NameParser parser = ic.getNameParser(""); scopeName.addAll(parser.parse(jndiName)); return ic.lookup(scopeName); }
public static Object lookup(Object scope, String jndiName) throws NamingException { Name scopeName = getNameForScope(scope); InitialContext ic = new InitialContext(); NameParser parser = ic.getNameParser(""); scopeName.addAll(parser.parse(jndiName)); return ic.lookup(scopeName); }
public static Context getContextForScope(Object scope) throws NamingException { InitialContext ic = new InitialContext(); NameParser parser = ic.getNameParser(""); Name name = parser.parse(""); if (scope != null) { name.add(canonicalizeScope(scope)); } return (Context)ic.lookup(name); }
public static Object lookup(Object scope, String jndiName) throws NamingException { Name scopeName = getNameForScope(scope); InitialContext ic = new InitialContext(); NameParser parser = ic.getNameParser(""); scopeName.addAll(parser.parse(jndiName)); return ic.lookup(scopeName); }
public static Context getContextForScope(Object scope) throws NamingException { InitialContext ic = new InitialContext(); NameParser parser = ic.getNameParser(""); Name name = parser.parse(""); if (scope != null) { name.add(canonicalizeScope(scope)); } return (Context)ic.lookup(name); }
public static Context getContextForScope(Object scope) throws NamingException { InitialContext ic = new InitialContext(); NameParser parser = ic.getNameParser(""); Name name = parser.parse(""); if (scope != null) { name.add(canonicalizeScope(scope)); } return (Context)ic.lookup(name); }
public static Object lookup(Object scope, String jndiName) throws NamingException { Name scopeName = getNameForScope(scope); InitialContext ic = new InitialContext(); NameParser parser = ic.getNameParser(""); scopeName.addAll(parser.parse(jndiName)); return ic.lookup(scopeName); }
public static Context getContextForScope(Object scope) throws NamingException { InitialContext ic = new InitialContext(); NameParser parser = ic.getNameParser(""); Name name = parser.parse(""); if (scope != null) { name.add(canonicalizeScope(scope)); } return (Context)ic.lookup(name); }
/** * {@inheritDoc} */ public NameParser getNameParser(Name name) throws NamingException { if (isInitialContextInitializerCall()) { return super.getNameParser(name); } return getContext().getNameParser(name); }
/** * {@inheritDoc} */ public NameParser getNameParser(String name) throws NamingException { if (isInitialContextInitializerCall()) { return super.getNameParser(name); } return getContext().getNameParser(name); }
public static Name makeNamingEntryName (NameParser parser, String jndiName) throws NamingException { if (jndiName==null) return null; if (parser==null) { InitialContext ic = new InitialContext(); parser = ic.getNameParser(""); } Name name = parser.parse(""); name.add(NamingEntry.__contextName); name.addAll(parser.parse(jndiName)); return name; }
public static Name makeNamingEntryName (NameParser parser, String jndiName) throws NamingException { if (jndiName==null) return null; if (parser==null) { InitialContext ic = new InitialContext(); parser = ic.getNameParser(""); } Name name = parser.parse(""); name.add(NamingEntry.__contextName); name.addAll(parser.parse(jndiName)); return name; }
/** * A factory method for creating {@link JMSTopicsContextImpl} initialized from context */ public static JMSTopicsContextImpl getInstanceInitializedFromContext(ThreadFactory threadFactory, FacesContext facesContext) throws NamingException { ConfigurationService configurationService = ServiceTracker.getService(ConfigurationService.class); InitialContext initialContext = new InitialContext(); NameParser nameParser = initialContext.getNameParser(""); Name connectionFactoryName = nameParser.parse(getConnectionFactory(facesContext, configurationService)); Name topicsNamespace = nameParser.parse(getTopicsNamespace(facesContext, configurationService)); String username = getUserName(facesContext, configurationService); String password = getPassword(facesContext, configurationService); return new JMSTopicsContextImpl(threadFactory, initialContext, connectionFactoryName, topicsNamespace, username, password); }