Author: pete.muir(a)jboss.org
Date: 2010-09-26 17:50:57 -0400 (Sun, 26 Sep 2010)
New Revision: 13780
Modified:
modules/remoting/trunk/core/pom.xml
modules/remoting/trunk/core/src/main/java/org/jboss/seam/remoting/ExecutionHandler.java
modules/remoting/trunk/core/src/main/java/org/jboss/seam/remoting/NonInjectionRemoting.java
modules/remoting/trunk/core/src/main/java/org/jboss/seam/remoting/model/ModelHandler.java
modules/remoting/trunk/pom.xml
Log:
comment out old conversation stuff, use BeanManager access from weldx
Modified: modules/remoting/trunk/core/pom.xml
===================================================================
--- modules/remoting/trunk/core/pom.xml 2010-09-26 20:52:36 UTC (rev 13779)
+++ modules/remoting/trunk/core/pom.xml 2010-09-26 21:50:57 UTC (rev 13780)
@@ -72,6 +72,12 @@
<artifactId>weld-core</artifactId>
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-extensions</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </dependency>
</dependencies>
</project>
Modified:
modules/remoting/trunk/core/src/main/java/org/jboss/seam/remoting/ExecutionHandler.java
===================================================================
---
modules/remoting/trunk/core/src/main/java/org/jboss/seam/remoting/ExecutionHandler.java 2010-09-26
20:52:36 UTC (rev 13779)
+++
modules/remoting/trunk/core/src/main/java/org/jboss/seam/remoting/ExecutionHandler.java 2010-09-26
21:50:57 UTC (rev 13780)
@@ -18,8 +18,6 @@
import org.dom4j.io.SAXReader;
import org.jboss.seam.remoting.util.Strings;
import org.jboss.seam.remoting.wrapper.Wrapper;
-import org.jboss.weld.conversation.ConversationManager2;
-import org.jboss.weld.servlet.BeanProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -69,12 +67,12 @@
final Element env = doc.getRootElement();
final RequestContext ctx = new RequestContext(env.element("header"));
- ConversationManager2 conversationManager =
BeanProvider.conversationManager(request.getServletContext());
+ //ConversationManager2 conversationManager =
BeanProvider.conversationManager(request.getServletContext());
if (ctx.getConversationId() != null &&
!Strings.isEmpty(ctx.getConversationId()))
{
// this is non portable ;/
- conversationManager.setupConversation(ctx.getConversationId());
+ //conversationManager.setupConversation(ctx.getConversationId());
}
// Extract the calls from the request
Modified:
modules/remoting/trunk/core/src/main/java/org/jboss/seam/remoting/NonInjectionRemoting.java
===================================================================
---
modules/remoting/trunk/core/src/main/java/org/jboss/seam/remoting/NonInjectionRemoting.java 2010-09-26
20:52:36 UTC (rev 13779)
+++
modules/remoting/trunk/core/src/main/java/org/jboss/seam/remoting/NonInjectionRemoting.java 2010-09-26
21:50:57 UTC (rev 13780)
@@ -1,39 +1,19 @@
package org.jboss.seam.remoting;
-import static
org.jboss.weld.logging.messages.ServletMessage.BEAN_DEPLOYMENT_ARCHIVE_MISSING;
-import static
org.jboss.weld.logging.messages.ServletMessage.BEAN_MANAGER_FOR_ARCHIVE_NOT_FOUND;
-
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
import javax.servlet.ServletContext;
-import org.jboss.seam.remoting.ExecutionHandler;
-import org.jboss.seam.remoting.InterfaceGenerator;
-import org.jboss.seam.remoting.Remoting;
import org.jboss.seam.remoting.model.ModelHandler;
-import org.jboss.weld.Container;
-import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
-import org.jboss.weld.exceptions.IllegalStateException;
-import org.jboss.weld.manager.BeanManagerImpl;
-import org.jboss.weld.servlet.api.ServletServices;
+import org.jboss.weld.extensions.beanManager.BeanManagerAccessor;
public class NonInjectionRemoting extends Remoting
{
private static final long serialVersionUID = -8985912269669096603L;
- private static BeanManagerImpl getBeanManager(ServletContext ctx)
+ private static BeanManager getBeanManager(ServletContext ctx)
{
- BeanDeploymentArchive war =
Container.instance().services().get(ServletServices.class).getBeanDeploymentArchive(ctx);
- if (war == null)
- {
- throw new IllegalStateException(BEAN_DEPLOYMENT_ARCHIVE_MISSING, ctx);
- }
- BeanManagerImpl beanManager =
Container.instance().beanDeploymentArchives().get(war);
- if (beanManager == null)
- {
- throw new IllegalStateException(BEAN_MANAGER_FOR_ARCHIVE_NOT_FOUND, ctx, war);
- }
- return beanManager;
+ return BeanManagerAccessor.getManager();
}
@SuppressWarnings("unchecked")
Modified:
modules/remoting/trunk/core/src/main/java/org/jboss/seam/remoting/model/ModelHandler.java
===================================================================
---
modules/remoting/trunk/core/src/main/java/org/jboss/seam/remoting/model/ModelHandler.java 2010-09-26
20:52:36 UTC (rev 13779)
+++
modules/remoting/trunk/core/src/main/java/org/jboss/seam/remoting/model/ModelHandler.java 2010-09-26
21:50:57 UTC (rev 13780)
@@ -29,8 +29,6 @@
import org.jboss.seam.remoting.wrapper.BeanWrapper;
import org.jboss.seam.remoting.wrapper.MapWrapper;
import org.jboss.seam.remoting.wrapper.Wrapper;
-import org.jboss.weld.conversation.ConversationManager2;
-import org.jboss.weld.servlet.BeanProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -70,11 +68,11 @@
final Element env = doc.getRootElement();
final RequestContext ctx = new RequestContext(env.element("header"));
- ConversationManager2 conversationManager =
BeanProvider.conversationManager(request.getServletContext());
+ //ConversationManager2 conversationManager =
BeanProvider.conversationManager(request.getServletContext());
if (ctx.getConversationId() != null &&
!Strings.isEmpty(ctx.getConversationId()))
{
- conversationManager.setupConversation(ctx.getConversationId());
+ //conversationManager.setupConversation(ctx.getConversationId());
}
Element modelElement = env.element("body").element("model");
Modified: modules/remoting/trunk/pom.xml
===================================================================
--- modules/remoting/trunk/pom.xml 2010-09-26 20:52:36 UTC (rev 13779)
+++ modules/remoting/trunk/pom.xml 2010-09-26 21:50:57 UTC (rev 13780)
@@ -5,7 +5,7 @@
<parent>
<artifactId>seam-parent</artifactId>
<groupId>org.jboss.seam</groupId>
- <version>3-SNAPSHOT</version>
+ <version>3</version>
</parent>
<groupId>org.jboss.seam.remoting</groupId>
@@ -70,6 +70,45 @@
<module>examples/model</module>
</modules>
</profile>
+ <profile>
+ <id>jboss-public-repository</id>
+ <activation>
+ <property>
+ <name>jboss-public-repository</name>
+ <value>!false</value>
+ </property>
+ </activation>
+ <repositories>
+ <repository>
+ <id>jboss-public-repository-group</id>
+ <name>JBoss Public Maven Repository Group</name>
+
<
url>http://repository.jboss.org/nexus/content/groups/public</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>jboss-public-repository-group</id>
+ <name>JBoss Public Maven Repository Group</name>
+
<
url>http://repository.jboss.org/nexus/content/groups/public</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
</profiles>
<scm>