Example usage for org.springframework.beans.factory.config BeanDefinition SCOPE_PROTOTYPE

List of usage examples for org.springframework.beans.factory.config BeanDefinition SCOPE_PROTOTYPE

Introduction

In this page you can find the example usage for org.springframework.beans.factory.config BeanDefinition SCOPE_PROTOTYPE.

Prototype

String SCOPE_PROTOTYPE

To view the source code for org.springframework.beans.factory.config BeanDefinition SCOPE_PROTOTYPE.

Click Source Link

Document

Scope identifier for the standard prototype scope: "prototype".

Usage

From source file:kzht.gm.springframework.extension.context.PrototypeScopeMetadataResolver.java

@Override
public ScopeMetadata resolveScopeMetadata(BeanDefinition definition) {
    if (LOG.isDebugEnabled()) {
        LOG.debug("Default scope will be prototype.");
    }//w  w  w .ja va  2 s  . c  om

    ScopeMetadata metadata = new ScopeMetadata();
    metadata.setScopeName(BeanDefinition.SCOPE_PROTOTYPE);
    return metadata;
}

From source file:gov.nih.nci.cacis.xds.client.TestXDSConfigImpl.java

/**
 * wrapper for xds doc handler/*ww w  .  ja  v  a 2 s . c  o  m*/
 * @return DocumentHandler instance
 */
@Bean
@Scope(value = BeanDefinition.SCOPE_PROTOTYPE)
public DocumentHandler wrapperDocumentHandler() {
    return documentHandler();
}

From source file:org.jdal.vaadin.beans.JdalVaadinNamespaceHandler.java

/**
 * {@inheritDoc}/*ww  w.  j a  v  a2  s.co m*/
 */
public void init() {
    registerBeanDefinitionParser("defaults", new DefaultsBeanDefinitionParser());
    registerBeanDefinitionParser("table", new TableBeanDefinitionParser());
    registerBeanDefinitionParser("column", new ColumnBeanDefinitionParser());
    registerBeanDefinitionParser("editor", new EditorBeanDefinitionParser());
    registerBeanDefinitionParser("columns", new ListBeanDefinitionParser(BeanDefinition.SCOPE_PROTOTYPE));
    registerBeanDefinitionParser("actions", new ListBeanDefinitionParser(BeanDefinition.SCOPE_PROTOTYPE));
    registerBeanDefinitionParser("button-bar", new ButtonBarBeanDefinitionParser());
    registerBeanDefinitionParser("navigator-action", new SimpleBeanDefinitionParser(NavigatorAction.class));
    registerBeanDefinitionParser("exit-action", new SimpleBeanDefinitionParser(ExitAction.class));
}

From source file:com.github.javarch.support.config.EMailConfig.java

@Bean
@Scope(value = BeanDefinition.SCOPE_PROTOTYPE)
public SimpleMailMessage templateMessage() {
    SimpleMailMessage simpleMessage = new SimpleMailMessage();
    simpleMessage.setFrom(env.getRequiredProperty("mail.username"));

    return simpleMessage;
}

From source file:org.jdal.vaadin.beans.ColumnsBeanDefinitionParser.java

/**
 * {@inheritDoc}//from  ww w . j av a  2 s  .  c o  m
 */
@Override
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
    List<Object> columns = parserContext.getDelegate().parseListElement(element,
            builder.getRawBeanDefinition());
    builder.addPropertyValue("sourceList", columns);
    builder.addPropertyValue("targetListClass", Column.class);
    builder.setScope(BeanDefinition.SCOPE_PROTOTYPE);
}

From source file:gov.nih.nci.cacis.ip.mirthconnect.config.IPMirthConfig.java

/**
 * Creates FTPSender.
 *
 * @return FTPSender
 */
@Bean
@Scope(value = BeanDefinition.SCOPE_PROTOTYPE)
public FTPSender sender() {
    return new FTPSender();
}

From source file:org.jdal.beans.ColumnsBeanDefinitionParser.java

/**
 * {@inheritDoc}/* ww  w.  j  a  va  2  s .c o  m*/
 */
@Override
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
    List<Object> columns = parserContext.getDelegate().parseListElement(element,
            builder.getRawBeanDefinition());
    builder.addPropertyValue("sourceList", columns);
    builder.addPropertyValue("targetListClass", ArrayList.class);
    builder.setScope(BeanDefinition.SCOPE_PROTOTYPE);
}

From source file:br.com.caelum.vraptor.ioc.spring.VRaptorScopeResolver.java

public VRaptorScopeResolver() {
    scopes.put(RequestScoped.class.getName(), WebApplicationContext.SCOPE_REQUEST);
    scopes.put(SessionScoped.class.getName(), WebApplicationContext.SCOPE_SESSION);
    scopes.put(ApplicationScoped.class.getName(), BeanDefinition.SCOPE_SINGLETON);
    scopes.put(PrototypeScoped.class.getName(), BeanDefinition.SCOPE_PROTOTYPE);
}

From source file:gov.nih.nci.cacis.ip.mirthconnect.config.IPMirthConfig.java

/**
 * Creates FTPSClient./*from  w  w  w.  j  a  v  a2s  . c o  m*/
 *
 * @return FTPSClient
 */
@Bean
@Scope(value = BeanDefinition.SCOPE_PROTOTYPE)
public FTPSClient ftpsCient() {
    return new FTPSClient("TLS", true);
}

From source file:gov.nih.nci.cacis.ip.mirthconnect.config.IPMirthConfig.java

/**
 * Creates FTPMapp ing./*from   w ww .j a va2 s  . com*/
 * @return FTPMapping
 * @throws IOException on I/O error
 */
@Bean
@Scope(value = BeanDefinition.SCOPE_PROTOTYPE)
public FTPMapping ftpMapping() throws IOException {
    return new FTPMapping(ftpMappingFile);
}