Example usage for org.springframework.context.annotation ScopedProxyMode NO

List of usage examples for org.springframework.context.annotation ScopedProxyMode NO

Introduction

In this page you can find the example usage for org.springframework.context.annotation ScopedProxyMode NO.

Prototype

ScopedProxyMode NO

To view the source code for org.springframework.context.annotation ScopedProxyMode NO.

Click Source Link

Document

Do not create a scoped proxy.

Usage

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

@Test
public void shouldResolveToRequestScopeByDefault() {
    ScopeMetadata scopeMetadata = readScopeMetadata(DummyComponent.class);
    Assert.assertEquals(ScopedProxyMode.NO, scopeMetadata.getScopedProxyMode());
    Assert.assertEquals(WebApplicationContext.SCOPE_REQUEST, scopeMetadata.getScopeName());
}

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

@Test
public void shouldResolveRequestScopedAnnotationToRequestScope() {
    ScopeMetadata scopeMetadata = readScopeMetadata(RequestScopedComponent.class);
    Assert.assertEquals(ScopedProxyMode.NO, scopeMetadata.getScopedProxyMode());
    Assert.assertEquals(WebApplicationContext.SCOPE_REQUEST, scopeMetadata.getScopeName());
}

From source file:org.vaadin.spring.events.config.EventBusConfiguration.java

@Bean
@Scope(value = VaadinSessionScope.VAADIN_SESSION_SCOPE_NAME, proxyMode = ScopedProxyMode.NO)
@Primary/*from  w w  w  .java 2  s.  c  o  m*/
EventBus.SessionEventBus sessionEventBus() {
    return new ScopedEventBus.DefaultSessionEventBus(applicationEventBus());
}

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

@Test
public void shouldResolveSessionScopedAnnotationToSessionScope() {
    ScopeMetadata scopeMetadata = readScopeMetadata(SessionScopedComponent.class);
    Assert.assertEquals(ScopedProxyMode.NO, scopeMetadata.getScopedProxyMode());
    Assert.assertEquals(WebApplicationContext.SCOPE_SESSION, scopeMetadata.getScopeName());
}

From source file:org.vaadin.spring.events.config.EventBusConfiguration.java

@Bean
@Scope(value = UIScopeImpl.VAADIN_UI_SCOPE_NAME, proxyMode = ScopedProxyMode.NO)
@Primary
EventBus.UIEventBus uiEventBus() {
    return new ScopedEventBus.DefaultUIEventBus(sessionEventBus());
}

From source file:org.vaadin.spring.events.config.VaadinEventbusConfiguration.java

@Bean
@Scope(value = VaadinUIScope.VAADIN_UI_SCOPE_NAME, proxyMode = ScopedProxyMode.NO)
@Primary
EventBus.UIEventBus uiEventBus() {
    return new ScopedEventBus.DefaultUIEventBus(sessionEventBus());
}

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

@Test
public void shouldResolveApplicationScopedAnnotationToSingletonScope() {
    ScopeMetadata scopeMetadata = readScopeMetadata(ApplicationScopedComponent.class);
    Assert.assertEquals(ScopedProxyMode.NO, scopeMetadata.getScopedProxyMode());
    Assert.assertEquals(BeanDefinition.SCOPE_SINGLETON, scopeMetadata.getScopeName());
}

From source file:org.vaadin.spring.events.config.EventBusConfiguration.java

@Bean
@Scope(value = ViewScopeImpl.VAADIN_VIEW_SCOPE_NAME, proxyMode = ScopedProxyMode.NO)
@Primary
EventBus.ViewEventBus viewEventBus() {
    return new ScopedEventBus.DefualtViewEventBus(uiEventBus());
}

From source file:org.vaadin.spring.events.config.VaadinEventbusConfiguration.java

@Bean
@Scope(value = VaadinViewScope.VAADIN_VIEW_SCOPE_NAME, proxyMode = ScopedProxyMode.NO)
@Primary
EventBus.ViewEventBus viewEventBus() {
    return new ScopedEventBus.DefualtViewEventBus(uiEventBus());
}

From source file:org.vaadin.spring.config.VaadinConfiguration.java

@Bean
@Scope(value = VaadinSessionScope.VAADIN_SESSION_SCOPE_NAME, proxyMode = ScopedProxyMode.NO)
@EventBusScope(EventScope.SESSION)/* ww  w .j ava  2  s.  c o  m*/
EventBus sessionEventBus() {
    return new ScopedEventBus(EventScope.SESSION, applicationEventBus());
}