You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by rm...@apache.org on 2020/10/26 19:25:04 UTC
[openwebbeans-meecrowave] 02/02: [MEECROWAVE-265] fix meecrowave
and its config bean scopes
This is an automated email from the ASF dual-hosted git repository.
rmannibucau pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwebbeans-meecrowave.git
commit 994a8a3e2a1d6c10194bf5e071b612f38fdc14a3
Author: Romain Manni-Bucau <rm...@gmail.com>
AuthorDate: Mon Oct 26 20:24:57 2020 +0100
[MEECROWAVE-265] fix meecrowave and its config bean scopes
---
.../main/java/org/apache/meecrowave/openwebbeans/OWBAutoSetup.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/OWBAutoSetup.java b/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/OWBAutoSetup.java
index e6f78fb..78d82dc 100644
--- a/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/OWBAutoSetup.java
+++ b/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/OWBAutoSetup.java
@@ -26,7 +26,7 @@ import org.apache.webbeans.configurator.BeanConfiguratorImpl;
import org.apache.webbeans.container.BeanManagerImpl;
import org.apache.webbeans.servlet.WebBeansConfigurationListener;
-import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.context.Dependent;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.Extension;
import javax.enterprise.inject.spi.configurator.BeanConfigurator;
@@ -89,14 +89,14 @@ public class OWBAutoSetup implements ServletContainerInitializer {
beanManager.addInternalBean(newBean(instance, configurator ->
configurator.beanClass(Meecrowave.Builder.class)
- .scope(ApplicationScoped.class)
+ .scope(Dependent.class)
.qualifiers(DefaultLiteral.INSTANCE)
.types(Configuration.class, Meecrowave.Builder.class, Object.class)
.createWith(cc -> meecrowave.getConfiguration())));
beanManager.addInternalBean(newBean(instance, configurator ->
configurator.beanClass(Meecrowave.class)
- .scope(ApplicationScoped.class)
+ .scope(Dependent.class)
.qualifiers(DefaultLiteral.INSTANCE)
.types(Meecrowave.class, AutoCloseable.class, Object.class)
.createWith(cc -> meecrowave)));