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/11/11 15:04:21 UTC
[2/2] git commit: DELTASPIKE-289 enable WindowContext via Extension
DELTASPIKE-289 enable WindowContext via Extension
Project: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/commit/49161282
Tree: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/tree/49161282
Diff: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/diff/49161282
Branch: refs/heads/master
Commit: 4916128227c75b9ead023d37ba86a2685aebf62c
Parents: c556f1f
Author: Mark Struberg <st...@apache.org>
Authored: Sun Nov 11 01:25:25 2012 +0100
Committer: Mark Struberg <st...@apache.org>
Committed: Sun Nov 11 14:51:03 2012 +0100
----------------------------------------------------------------------
.../scope/window/DeltaSpikeContextExtension.java | 38 +++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/49161282/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/scope/window/DeltaSpikeContextExtension.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/scope/window/DeltaSpikeContextExtension.java b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/scope/window/DeltaSpikeContextExtension.java
new file mode 100644
index 0000000..9f03783
--- /dev/null
+++ b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/scope/window/DeltaSpikeContextExtension.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.deltaspike.core.impl.scope.window;
+
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.AfterBeanDiscovery;
+import javax.enterprise.inject.spi.BeanManager;
+
+/**
+ * Handle all DeltaSpike WindowContext and ConversationContext
+ * related features.
+ */
+public class DeltaSpikeContextExtension
+{
+ private DefaultWindowContext windowContext;
+
+ public void registerDeltaSpikeContexts(@Observes AfterBeanDiscovery afterBeanDiscovery, BeanManager beanManager)
+ {
+ windowContext = new DefaultWindowContext(beanManager);
+ afterBeanDiscovery.addContext(windowContext);
+ }
+}