You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by st...@apache.org on 2012/07/19 10:11:01 UTC
git commit: DELTASPIKE-207 move context control to generic scope
annotations.
Updated Branches:
refs/heads/master ac32cc4ad -> c32050e08
DELTASPIKE-207 move context control to generic scope annotations.
This fixes compat with owb-1.1.5 while remaining backward compatible.
Project: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/commit/c32050e0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/tree/c32050e0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/diff/c32050e0
Branch: refs/heads/master
Commit: c32050e080f598848f27aaeefd6c4283fba6a401
Parents: ac32cc4
Author: Mark Struberg <st...@apache.org>
Authored: Thu Jul 19 10:07:51 2012 +0200
Committer: Mark Struberg <st...@apache.org>
Committed: Thu Jul 19 10:08:46 2012 +0200
----------------------------------------------------------------------
.../cdise/owb/OpenWebBeansContextControl.java | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/c32050e0/deltaspike/cdictrl/impl-owb/src/main/java/org/apache/deltaspike/cdise/owb/OpenWebBeansContextControl.java
----------------------------------------------------------------------
diff --git a/deltaspike/cdictrl/impl-owb/src/main/java/org/apache/deltaspike/cdise/owb/OpenWebBeansContextControl.java b/deltaspike/cdictrl/impl-owb/src/main/java/org/apache/deltaspike/cdise/owb/OpenWebBeansContextControl.java
index 7dda79c..c8467c0 100644
--- a/deltaspike/cdictrl/impl-owb/src/main/java/org/apache/deltaspike/cdise/owb/OpenWebBeansContextControl.java
+++ b/deltaspike/cdictrl/impl-owb/src/main/java/org/apache/deltaspike/cdise/owb/OpenWebBeansContextControl.java
@@ -24,13 +24,13 @@ import javax.enterprise.context.Dependent;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.context.SessionScoped;
import javax.enterprise.context.spi.Context;
+import javax.inject.Singleton;
import java.lang.annotation.Annotation;
import org.apache.deltaspike.cdise.api.ContextControl;
import org.apache.webbeans.config.WebBeansContext;
import org.apache.webbeans.context.ContextFactory;
-import org.apache.webbeans.context.type.ContextTypes;
/**
* OWB specific impl of the {@link ContextControl}
@@ -175,7 +175,7 @@ public class OpenWebBeansContextControl implements ContextControl
{
ContextFactory contextFactory = getContextFactory();
- Context context = contextFactory.getStandardContext(ContextTypes.SINGLETON);
+ Context context = contextFactory.getStandardContext(Singleton.class);
if (context != null)
{
Object mockServletContextEvent = null;
@@ -191,7 +191,7 @@ public class OpenWebBeansContextControl implements ContextControl
{
ContextFactory contextFactory = getContextFactory();
- Context context = contextFactory.getStandardContext(ContextTypes.APPLICATION);
+ Context context = contextFactory.getStandardContext(ApplicationScoped.class);
if (context != null)
{
Object mockServletContextEvent = null;
@@ -207,7 +207,7 @@ public class OpenWebBeansContextControl implements ContextControl
{
ContextFactory contextFactory = getContextFactory();
- Context context = contextFactory.getStandardContext(ContextTypes.SESSION);
+ Context context = contextFactory.getStandardContext(SessionScoped.class);
if (context != null)
{
Object mockSession = null;
@@ -223,7 +223,7 @@ public class OpenWebBeansContextControl implements ContextControl
{
ContextFactory contextFactory = getContextFactory();
- Context context = contextFactory.getStandardContext(ContextTypes.REQUEST);
+ Context context = contextFactory.getStandardContext(RequestScoped.class);
if (context != null)
{
contextFactory.destroyRequestContext(null);
@@ -234,7 +234,7 @@ public class OpenWebBeansContextControl implements ContextControl
{
ContextFactory contextFactory = getContextFactory();
- Context context = contextFactory.getStandardContext(ContextTypes.CONVERSATION);
+ Context context = contextFactory.getStandardContext(ConversationScoped.class);
if (context != null)
{
contextFactory.destroyConversationContext();