protected JndiRegistry createRegistry() throws Exception { return new JndiRegistry(createJndiContext()); }
@Override protected JndiRegistry createRegistry() throws Exception { Map<String, Object> properties = new HashMap<>(); properties.put("beanName", "my-bean"); ComponentProxyComponent component = new ComponentProxyComponent("my-bean-proxy", "bean"); component.setOptions(properties); JndiRegistry registry = super.createRegistry(); registry.bind("my-bean", new MyBean()); registry.bind(component.getComponentId() + "-component", component); return registry; }
@Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry registry = super.createRegistry(); registry.bind("my-bean", new ComponentProxyComponentTest.MyBean()); return registry; }
@Override protected JndiRegistry createRegistry() throws Exception { jndiContext = new InitialContext(); return new JndiRegistry(jndiContext); }
@Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry registry = super.createRegistry(); registry.bind("my-bean", new ComponentProxyComponentTest.MyBean()); return registry; }
protected CompositeRegistry createRegistry() { final ServiceLoader<Registry> registriesLoaders = ServiceLoader.load(Registry.class, getClass().getClassLoader()); final List<Registry> registries = new ArrayList<Registry>(); registries.add(new JndiRegistry()); if (isEnableCdiIntegration()) { registries.add(new CdiBeanRegistry()); } registries.add(_writeableRegistry); for (Registry registry : registriesLoaders) { registries.add(registry); } return new CompositeRegistry(registries); }
@Override protected JndiRegistry createRegistry() throws Exception { Map<String, Object> properties = new HashMap<>(); properties.put("beanName", "my-bean"); ComponentProxyComponent component = new ComponentProxyComponent("my-bean-proxy", "bean"); component.setOptions(properties); JndiRegistry registry = super.createRegistry(); registry.bind("my-bean", new MyBean()); registry.bind(component.getComponentId() + "-component", component); return registry; }
@Override protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { EjbEndpoint answer = new EjbEndpoint(uri, this); answer.setBeanName(remaining); // plugin registry to lookup in jndi for the EJBs Registry registry = new JndiRegistry(getContext()); // and register the bean as a holder on the endpoint BeanHolder holder = new EjbRegistryBean(registry, getCamelContext(), answer.getBeanName()); answer.setBeanHolder(holder); return answer; }
@Override protected JndiRegistry createRegistry() throws Exception { JndiRegistry registry = super.createRegistry(); registry.bind("my-bean", new ComponentProxyComponentTest.MyBean()); return registry; }
this.context.getRegistry(JndiRegistry.class).bind(PetalsCamelContext.class.getName(), this);