/** * @see javax.jbi.component.ComponentContext#getNamingContext() */ public InitialContext getNamingContext() { return context.getNamingContext(); }
/** * @see javax.jbi.component.ComponentContext#getNamingContext() */ public InitialContext getNamingContext() { return this.context.getNamingContext(); }
public InitialContext getNamingContext() { return context.getNamingContext(); }
public InitialContext getNamingContext() { return getContext().getNamingContext(); }
@Override public InitialContext getInitialContext() { return PetalsBindingComponent.this.getContext() .getNamingContext(); }
protected InitialContext getInitialContext() throws NamingException { Properties props = new Properties(); if (endpoint.getInitialContextFactory() != null && endpoint.getJndiProviderURL() != null) { props.put(InitialContext.INITIAL_CONTEXT_FACTORY, endpoint.getInitialContextFactory()); props.put(InitialContext.PROVIDER_URL, endpoint.getJndiProviderURL()); return new InitialContext(props); } else if (endpoint.getConfiguration().getJndiInitialContextFactory() != null && endpoint.getConfiguration().getJndiProviderUrl() != null) { props.put(InitialContext.INITIAL_CONTEXT_FACTORY, endpoint.getConfiguration().getJndiInitialContextFactory()); props.put(InitialContext.PROVIDER_URL, endpoint.getConfiguration().getJndiProviderUrl()); return new InitialContext(props); } else { return endpoint.getServiceUnit().getComponent().getComponentContext().getNamingContext(); } }
try { String name = configuration.getKeystoreManagerName(); Object km = context.getNamingContext().lookup(name); configuration.setKeystoreManager(km); } catch (Exception e) { try { String name = configuration.getAuthenticationServiceName(); Object as = context.getNamingContext().lookup(name); configuration.setAuthenticationService(as); } catch (Exception e) {
@Override protected void doInit() throws Exception { //Load configuration configuration.setRootDir(context.getWorkspaceRoot()); configuration.setComponentName(context.getComponentName()); configuration.load(); if (configuration.getBusCfg() != null && configuration.getBusCfg().length() > 0) { SpringBusFactory bf = new SpringBusFactory(); bus = bf.createBus(configuration.getBusCfg()); } else { bus = BusFactory.newInstance().createBus(); } if (getConfiguration().getAuthenticationService() == null) { try { String name = getConfiguration().getAuthenticationServiceName(); Object as = context.getNamingContext().lookup(name); getConfiguration().setAuthenticationService(as); } catch (Throwable e) { try { Class cl = Class.forName("org.apache.servicemix.jbi.security.auth.impl.JAASAuthenticationService"); getConfiguration().setAuthenticationService(cl.newInstance()); } catch (Throwable t) { logger.warn("Unable to retrieve or create the authentication service"); } } } super.doInit(); }
try { String name = configuration.getKeystoreManagerName(); Object km = context.getNamingContext().lookup(name); configuration.setKeystoreManager(km); } catch (Throwable e) { try { String name = configuration.getAuthenticationServiceName(); Object as = context.getNamingContext().lookup(name); configuration.setAuthenticationService(as); } catch (Throwable e) {