public <T> T getBeanOfType(String name, Class<T> type) { return cbl.getBeanOfType(name, type); }
public <T> T getBeanOfType(String name, Class<T> type) { return cbl.getBeanOfType(name, type); }
public <T> T getBeanOfType(String name, Class<T> type) { return cbl.getBeanOfType(name, type); }
public <T> T getBeanOfType(String name, Class<T> type) { return cbl.getBeanOfType(name, type); }
public <T> T getBeanOfType(String name, Class<T> type) { T t = null; try { t = type.cast(context.getBean(name, type)); } catch (NoSuchBeanDefinitionException nsbde) { //ignore } if (t == null) { t = orig.getBeanOfType(name, type); } return t; }
public <T> T getBeanOfType(String name, Class<T> type) { T t = null; try { t = type.cast(context.getBean(name, type)); } catch (NoSuchBeanDefinitionException nsbde) { //ignore } if (t == null) { t = orig.getBeanOfType(name, type); } return t; }
public <T> T getBeanOfType(String name, Class<T> type) { T t = null; try { t = type.cast(context.getBean(name, type)); } catch (NoSuchBeanDefinitionException nsbde) { //ignore } if (t == null) { t = orig.getBeanOfType(name, type); } return t; }
public <T> T getBeanOfType(String name, Class<T> type) { T t = null; try { t = type.cast(context.getBean(name, type)); } catch (NoSuchBeanDefinitionException nsbde) { //ignore } if (t == null) { t = orig.getBeanOfType(name, type); } return t; }
private Element loadLocalPolicy(String uri) { PolicyBean pb = bus.getExtension(ConfiguredBeanLocator.class) .getBeanOfType(uri.substring(1), PolicyBean.class); if (null != pb) { return pb.getElement(); } return null; } }
private Element loadLocalPolicy(String uri) { PolicyBean pb = bus.getExtension(ConfiguredBeanLocator.class) .getBeanOfType(uri.substring(1), PolicyBean.class); if (null != pb) { return pb.getElement(); } return null; } }
@SuppressWarnings("unchecked") @Override public <T> T getBeanOfType(String name, Class<T> type) { if (registry.containsKey(name)) { return (T)registry.get(name); } return cbl.getBeanOfType(name, type); }
public <T> T getBeanOfType(String name, Class<T> type) { ComponentMetadata cmd = getComponentMetadata(name); Class<?> cls = getClassForMetaData(cmd); if (cls != null && type.isAssignableFrom(cls)) { return type.cast(container.getComponentInstance(name)); } return orig.getBeanOfType(name, type); } /** {@inheritDoc}*/
public <T> T getBeanOfType(String name, Class<T> type) { ComponentMetadata cmd = getComponentMetadata(name); Class<?> cls = getClassForMetaData(cmd); if (cls != null && type.isAssignableFrom(cls)) { return type.cast(container.getComponentInstance(name)); } return orig.getBeanOfType(name, type); } /** {@inheritDoc}*/
public <T> T getBeanOfType(String name, Class<T> type) { ComponentMetadata cmd = getComponentMetadata(name); Class<?> cls = getClassForMetaData(cmd); if (cls != null && type.isAssignableFrom(cls)) { return type.cast(container.getComponentInstance(name)); } return orig.getBeanOfType(name, type); } /** {@inheritDoc}*/
public <T> T getBeanOfType(String name, Class<T> type) { ComponentMetadata cmd = getComponentMetadata(name); Class<?> cls = getClassForMetaData(cmd); if (cls != null && type.isAssignableFrom(cls)) { return type.cast(container.getComponentInstance(name)); } return orig.getBeanOfType(name, type); } /** {@inheritDoc}*/
private static TransactionManager getTransactionManager(Bus bus, JMSEndpoint endpoint) { String tmName = endpoint.getJndiTransactionManagerName(); TransactionManager tm = null; ConfiguredBeanLocator locator = bus.getExtension(ConfiguredBeanLocator.class); if (tmName != null) { if (locator != null) { tm = locator.getBeanOfType(tmName, TransactionManager.class); } if (tm == null) { tm = getTransactionManagerFromJndi(tmName); } } if (tm == null && locator != null) { Collection<? extends TransactionManager> tms = locator.getBeansOfType(TransactionManager.class); if (tms.size() == 1) { tm = tms.iterator().next(); } } return tm; }
public Policy resolveReference(String uri) { PolicyBean pb = bus.getExtension(ConfiguredBeanLocator.class) .getBeanOfType(uri, PolicyBean.class); if (null != pb) { PolicyBuilder builder = bus.getExtension(PolicyBuilder.class); return builder.getPolicy(pb.getElement()); } return null; } };
public Policy resolveReference(String uri) { PolicyBean pb = bus.getExtension(ConfiguredBeanLocator.class) .getBeanOfType(uri, PolicyBean.class); if (null != pb) { PolicyBuilder builder = bus.getExtension(PolicyBuilder.class); return builder.getPolicy(pb.getElement()); } return null; } };
private void addEndpointProperties(Endpoint ep, Bus bus, EndpointProperty ... annotations) { for (EndpointProperty prop : annotations) { if (prop == null) { continue; } String ref = prop.ref(); Class<?> cls = prop.beanClass(); Object obj = null; String[] s = prop.value(); if (!StringUtils.isEmpty(ref)) { obj = bus.getExtension(ConfiguredBeanLocator.class).getBeanOfType(ref, cls); } else if (s.length == 0 && cls != Object.class) { obj = createObject(cls, ep, bus); } else if (s.length == 1) { obj = s[0]; } else { obj = s; } ep.getEndpointInfo().setProperty(prop.key(), obj); } }
private void addEndpointProperties(Endpoint ep, Bus bus, EndpointProperty ... annotations) { for (EndpointProperty prop : annotations) { if (prop == null) { continue; } String ref = prop.ref(); Class<?> cls = prop.beanClass(); Object obj = null; String s[] = prop.value(); if (!StringUtils.isEmpty(ref)) { obj = bus.getExtension(ConfiguredBeanLocator.class).getBeanOfType(ref, cls); } else if (s.length == 0 && cls != Object.class) { obj = createObject(cls, ep, bus); } else if (s.length == 1) { obj = s[0]; } else { obj = s; } ep.getEndpointInfo().setProperty(prop.key(), obj); } }