You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by ad...@apache.org on 2018/08/25 16:12:54 UTC

wicket git commit: WICKET-6581 Upgrade wicket-cdi to cdi version 2

Repository: wicket
Updated Branches:
  refs/heads/master f8e4d1b00 -> 0f64e1f9e


WICKET-6581 Upgrade wicket-cdi to cdi version 2

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/0f64e1f9
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/0f64e1f9
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/0f64e1f9

Branch: refs/heads/master
Commit: 0f64e1f9e30bb3642805730e2409e9d3ac4ebcea
Parents: f8e4d1b
Author: Andrea Del Bene <an...@gmail.com>
Authored: Sat Aug 25 18:12:31 2018 +0200
Committer: Andrea Del Bene <an...@gmail.com>
Committed: Sat Aug 25 18:12:31 2018 +0200

----------------------------------------------------------------------
 pom.xml                                         | 18 ++++++++-----
 wicket-cdi/pom.xml                              | 28 +++++++++++---------
 .../org/apache/wicket/cdi/CdiConfiguration.java |  2 --
 .../org/apache/wicket/cdi/CdiContainer.java     |  8 +++---
 4 files changed, 31 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/0f64e1f9/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e7716e0..2419781 100644
--- a/pom.xml
+++ b/pom.xml
@@ -419,20 +419,26 @@
 				<type>jar</type>
 			</dependency>
 			<dependency>
-				<groupId>org.jboss.seam.conversation</groupId>
-				<artifactId>seam-conversation-spi</artifactId>
-				<version>3.0.0.Final</version>
-			</dependency>
-			<dependency>
 				<groupId>org.jboss.weld.servlet</groupId>
 				<artifactId>weld-servlet</artifactId>
 				<version>2.4.2.SP1</version>
 			</dependency>
 			<dependency>
 			    <groupId>org.jboss.weld</groupId>
+			    <artifactId>weld-api</artifactId>
+			    <version>3.0.SP4</version>
+			</dependency>
+			<dependency>
+			    <groupId>org.jboss.weld</groupId>
 			    <artifactId>weld-spi</artifactId>
-			    <version>3.0.SP3</version>
+			    <version>3.0.SP4</version>
+			</dependency>
+                        <dependency>
+			    <groupId>org.jboss.weld</groupId>
+			    <artifactId>weld-core-impl</artifactId>
+			    <version>3.0.5.Final</version>
 			</dependency>
+
 			<dependency>
 			    <groupId>org.jboss.weld.module</groupId>
 			    <artifactId>weld-web</artifactId>

http://git-wip-us.apache.org/repos/asf/wicket/blob/0f64e1f9/wicket-cdi/pom.xml
----------------------------------------------------------------------
diff --git a/wicket-cdi/pom.xml b/wicket-cdi/pom.xml
index bbb0662..a0cf977 100644
--- a/wicket-cdi/pom.xml
+++ b/wicket-cdi/pom.xml
@@ -15,7 +15,9 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<parent>
 		<groupId>org.apache.wicket</groupId>
@@ -33,16 +35,16 @@
 		and resources.
 	</description>
 	<dependencyManagement>
-    	<dependencies>
-            <!-- local management because we can only define one GAV in the parent -->
-        	<dependency>
-        		<groupId>javax.enterprise</groupId>
-        		<artifactId>cdi-api</artifactId>
-        		<version>1.0-SP4</version>
-        		<scope>provided</scope>
-        	</dependency>
-        </dependencies>   
-    </dependencyManagement>
+		<dependencies>
+			<!-- local management because we can only define one GAV in the parent -->
+			<dependency>
+				<groupId>javax.enterprise</groupId>
+				<artifactId>cdi-api</artifactId>
+				<version>2.0.SP1</version>
+				<scope>provided</scope>
+			</dependency>
+		</dependencies>
+	</dependencyManagement>
 	<dependencies>
 		<dependency>
 			<groupId>javax.enterprise</groupId>
@@ -53,8 +55,8 @@
 			<artifactId>wicket-core</artifactId>
 		</dependency>
 		<dependency>
-			<groupId>org.jboss.seam.conversation</groupId>
-			<artifactId>seam-conversation-spi</artifactId>
+			<groupId>org.jboss.weld</groupId>
+			<artifactId>weld-core-impl</artifactId>
 		</dependency>
 		<dependency>
 			<groupId>junit</groupId>

http://git-wip-us.apache.org/repos/asf/wicket/blob/0f64e1f9/wicket-cdi/src/main/java/org/apache/wicket/cdi/CdiConfiguration.java
----------------------------------------------------------------------
diff --git a/wicket-cdi/src/main/java/org/apache/wicket/cdi/CdiConfiguration.java b/wicket-cdi/src/main/java/org/apache/wicket/cdi/CdiConfiguration.java
index 2e2d6c8..ad369a1 100644
--- a/wicket-cdi/src/main/java/org/apache/wicket/cdi/CdiConfiguration.java
+++ b/wicket-cdi/src/main/java/org/apache/wicket/cdi/CdiConfiguration.java
@@ -21,7 +21,6 @@ import javax.enterprise.inject.spi.BeanManager;
 import org.apache.wicket.Application;
 import org.apache.wicket.request.cycle.RequestCycleListenerCollection;
 import org.apache.wicket.util.lang.Args;
-import org.jboss.seam.conversation.spi.SeamConversationContextFactory;
 
 /**
  * Configures CDI integration
@@ -189,7 +188,6 @@ public class CdiConfiguration
 				autoConversationManagement));
 			application.getComponentPreOnBeforeRenderListeners().add(
 				new ConversationExpiryChecker(container));
-			SeamConversationContextFactory.setDisableNoopInstance(true);
 		}
 
 		// enable detach event

http://git-wip-us.apache.org/repos/asf/wicket/blob/0f64e1f9/wicket-cdi/src/main/java/org/apache/wicket/cdi/CdiContainer.java
----------------------------------------------------------------------
diff --git a/wicket-cdi/src/main/java/org/apache/wicket/cdi/CdiContainer.java b/wicket-cdi/src/main/java/org/apache/wicket/cdi/CdiContainer.java
index 3a5cc96..168588d 100644
--- a/wicket-cdi/src/main/java/org/apache/wicket/cdi/CdiContainer.java
+++ b/wicket-cdi/src/main/java/org/apache/wicket/cdi/CdiContainer.java
@@ -24,8 +24,8 @@ import org.apache.wicket.MetaDataKey;
 import org.apache.wicket.Page;
 import org.apache.wicket.request.cycle.RequestCycle;
 import org.apache.wicket.util.lang.Args;
-import org.jboss.seam.conversation.spi.SeamConversationContext;
-import org.jboss.seam.conversation.spi.SeamConversationContextFactory;
+import org.jboss.weld.Container;
+import org.jboss.weld.context.http.HttpConversationContext; 
 
 /**
  * Provides access to CDI features from inside a Wicket request
@@ -41,7 +41,7 @@ public class CdiContainer
 	};
 
 	protected final BeanManager beanManager;
-	private final SeamConversationContext<HttpServletRequest> conversationContext;
+	private final HttpConversationContext conversationContext;
 	private final INonContextualManager nonContextualManager;
 
 	/**
@@ -58,7 +58,7 @@ public class CdiContainer
 		this.beanManager = beanManager;
 		this.nonContextualManager = nonContextualManager;
 
-		conversationContext = SeamConversationContextFactory.getContext(HttpServletRequest.class);
+		conversationContext =  Container.instance().deploymentManager().instance().select(HttpConversationContext.class).get(); 
 		if (conversationContext == null)
 		{
 			throw new IllegalStateException(