.append(beanDefinition.isPrototype() ? ", prototype" : "") .append(beanDefinition.isSingleton() ? ", singleton" : "") .toString();
private Component getReferencedProcessor(String name) { if (applicationContext instanceof MuleArtifactContext) { MuleArtifactContext muleArtifactContext = (MuleArtifactContext) applicationContext; try { if (muleArtifactContext.getBeanFactory().getBeanDefinition(name).isPrototype()) { muleArtifactContext.getPrototypeBeanWithRootContainer(name, getRootContainerLocation().toString()); } } catch (NoSuchBeanDefinitionException e) { // Null is handled by the caller method return null; } } return (Component) applicationContext.getBean(name); }
/** * Returns a prototype chain of processors mutating the root container name of the set of beans created from that prototype * object. * * @param name the bean name * @param rootContainerName the new root container name. */ public synchronized void getPrototypeBeanWithRootContainer(String name, String rootContainerName) { BeanDefinition beanDefinition = getBeanFactory().getBeanDefinition(name); checkState(beanDefinition.isPrototype(), format("Bean with name %s is not a prototype", name)); updateBeanDefinitionRootContainerName(rootContainerName, beanDefinition); }
if (beanFactory.containsBeanDefinition(beanName) && beanFactory.getBeanDefinition(beanName).isPrototype()) {
/** {@inheritDoc} */ @Override public void postProcessBeanFactory(final ConfigurableListableBeanFactory beanFactory) { for (final String beanName : beanFactory.getBeanNamesForAnnotation(Prototype.class)) { final BeanDefinition beanDefinition = beanFactory.getBeanDefinition(beanName); if (!beanDefinition.isPrototype()) { log.warn("Profile action '{}' is not '{}' scope but must be, please check your configuration.", beanName, BeanDefinition.SCOPE_PROTOTYPE); beanDefinition.setScope(BeanDefinition.SCOPE_PROTOTYPE); } } } }
/** * Returns a prototype chain of processors mutating the root container name of the set of beans created from that prototype * object. * * @param name the bean name * @param rootContainerName the new root container name. */ public synchronized void getPrototypeBeanWithRootContainer(String name, String rootContainerName) { BeanDefinition beanDefinition = getBeanFactory().getBeanDefinition(name); checkState(beanDefinition.isPrototype(), format("Bean with name %s is not a prototype", name)); updateBeanDefinitionRootContainerName(rootContainerName, beanDefinition); }
private Component getReferencedProcessor(String name) { if (applicationContext instanceof MuleArtifactContext) { MuleArtifactContext muleArtifactContext = (MuleArtifactContext) applicationContext; try { if (muleArtifactContext.getBeanFactory().getBeanDefinition(name).isPrototype()) { muleArtifactContext.getPrototypeBeanWithRootContainer(name, getRootContainerLocation().toString()); } } catch (NoSuchBeanDefinitionException e) { // Null is handled by the caller method return null; } } return (Component) applicationContext.getBean(name); }
if (beanFactory.containsBeanDefinition(beanName) && beanFactory.getBeanDefinition(beanName).isPrototype()) {
.append(beanDefinition.isPrototype() ? ", prototype" : "") .append(beanDefinition.isSingleton() ? ", singleton" : "") .toString();
null); if (viewBeanDefinition == null || !viewBeanDefinition.isPrototype()) {
null); if (viewBeanDefinition == null || !viewBeanDefinition.isPrototype()) {
null); if (viewBeanDefinition == null || !viewBeanDefinition.isPrototype()) {
null); if (viewBeanDefinition == null || !viewBeanDefinition.isPrototype()) {
null); if (viewBeanDefinition == null || !viewBeanDefinition.isPrototype()) {
null); if (viewBeanDefinition == null || !viewBeanDefinition.isPrototype()) {