[seam-commits] Seam SVN: r13283 - in modules/drools/trunk: api and 3 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Mon Jun 21 13:27:49 EDT 2010
Author: tsurdilovic
Date: 2010-06-21 13:27:48 -0400 (Mon, 21 Jun 2010)
New Revision: 13283
Modified:
modules/drools/trunk/api/pom.xml
modules/drools/trunk/impl/pom.xml
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/ExecutionResultsProducer.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeBaseProducer.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/SeamDelegate.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/delegate/DelegateTest.java
modules/drools/trunk/pom.xml
Log:
Fixed SeamDelegate to use the beans class instead of Object.class and updated the poms to make sure they get correct arquillian dependencies.
Modified: modules/drools/trunk/api/pom.xml
===================================================================
--- modules/drools/trunk/api/pom.xml 2010-06-20 19:35:38 UTC (rev 13282)
+++ modules/drools/trunk/api/pom.xml 2010-06-21 17:27:48 UTC (rev 13283)
@@ -64,27 +64,6 @@
<groupId>org.jboss.weld</groupId>
<artifactId>weld-extensions</artifactId>
</dependency>
- <!-- Test Dependencies -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam.xml</groupId>
- <artifactId>seam-xml-config</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.arquillian</groupId>
- <artifactId>arquillian-junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-weld-embedded</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
Modified: modules/drools/trunk/impl/pom.xml
===================================================================
--- modules/drools/trunk/impl/pom.xml 2010-06-20 19:35:38 UTC (rev 13282)
+++ modules/drools/trunk/impl/pom.xml 2010-06-21 17:27:48 UTC (rev 13283)
@@ -1,97 +1,107 @@
<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>
+ 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.jboss.seam.drools</groupId>
- <artifactId>seam-drools-parent</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
+ <parent>
+ <groupId>org.jboss.seam.drools</groupId>
+ <artifactId>seam-drools-parent</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
- <groupId>org.jboss.seam.drools</groupId>
- <artifactId>seam-drools-impl</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- <packaging>jar</packaging>
- <name>Seam Drools Module Core Implementation</name>
+ <groupId>org.jboss.seam.drools</groupId>
+ <artifactId>seam-drools-impl</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+ <name>Seam Drools Module Core Implementation</name>
- <dependencies>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.enterprise</groupId>
- <artifactId>cdi-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.spec.javax.interceptor</groupId>
- <artifactId>jboss-interceptors-api_1.1_spec</artifactId>
- </dependency>
- <dependency>
+ <dependencies>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.enterprise</groupId>
+ <artifactId>cdi-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.interceptor</groupId>
+ <artifactId>jboss-interceptors-api_1.1_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.drools</groupId>
+ <artifactId>drools-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.drools</groupId>
+ <artifactId>drools-compiler</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.drools</groupId>
+ <artifactId>drools-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.drools</groupId>
+ <artifactId>drools-templates</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.drools</groupId>
+ <artifactId>drools-decisiontables</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.drools</groupId>
+ <artifactId>drools-workitems</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-extensions</artifactId>
+ </dependency>
+
+ <dependency>
+ <artifactId>seam-drools-api</artifactId>
+ <groupId>org.jboss.seam.drools</groupId>
+ <scope>compile</scope>
+ </dependency>
+ <!-- Test Dependencies -->
+ <dependency>
+ <groupId>org.jboss.seam.xml</groupId>
+ <artifactId>seam-xml-config</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <!-- Test Dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian</groupId>
+ <artifactId>arquillian-junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian.container</groupId>
+ <artifactId>arquillian-weld-embedded</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-compiler</artifactId>
- </dependency>
- <dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-templates</artifactId>
- </dependency>
- <dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-decisiontables</artifactId>
- </dependency>
- <dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-workitems</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-extensions</artifactId>
- </dependency>
- <!-- Test Dependencies -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.seam.xml</groupId>
- <artifactId>seam-xml-config</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.arquillian</groupId>
- <artifactId>arquillian-junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-weld-embedded</artifactId>
- <scope>test</scope>
- </dependency>
+ </dependencies>
- <dependency>
- <artifactId>seam-drools-api</artifactId>
- <groupId>org.jboss.seam.drools</groupId>
- <scope>compile</scope>
- </dependency>
-
- </dependencies>
-
</project>
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/ExecutionResultsProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/ExecutionResultsProducer.java 2010-06-20 19:35:38 UTC (rev 13282)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/ExecutionResultsProducer.java 2010-06-21 17:27:48 UTC (rev 13283)
@@ -29,6 +29,7 @@
import javax.enterprise.context.RequestScoped;
import javax.enterprise.context.SessionScoped;
+import javax.enterprise.inject.Default;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.BeanManager;
import javax.inject.Inject;
@@ -73,6 +74,7 @@
@SuppressWarnings("unchecked")
@Produces
@Stateless
+ @Default
@RequestScoped
public ExecutionResults produceStatelessExecutionResults(StatelessKnowledgeSession ksession) {
return ksession.execute(CommandFactory.newBatchExecution(getCommandList()));
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeBaseProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeBaseProducer.java 2010-06-20 19:35:38 UTC (rev 13282)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeBaseProducer.java 2010-06-21 17:27:48 UTC (rev 13283)
@@ -28,6 +28,7 @@
import java.util.Iterator;
import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Default;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.BeanManager;
import javax.inject.Inject;
@@ -70,6 +71,7 @@
DroolsExtension droolsExtension;
@Produces
+ @Default
@ApplicationScoped
public KnowledgeBase produceKnowledgeBase(DroolsConfig config) throws Exception
{
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/SeamDelegate.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/SeamDelegate.java 2010-06-20 19:35:38 UTC (rev 13282)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/SeamDelegate.java 2010-06-21 17:27:48 UTC (rev 13283)
@@ -55,7 +55,7 @@
{
Bean<?> bean = beans.iterator().next();
CreationalContext<?> context = manager.createCreationalContext(bean);
- return manager.getReference(bean, Object.class, context);
+ return manager.getReference(bean, bean.getBeanClass(), context);
}
else
{
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/delegate/DelegateTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/delegate/DelegateTest.java 2010-06-20 19:35:38 UTC (rev 13282)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/delegate/DelegateTest.java 2010-06-21 17:27:48 UTC (rev 13283)
@@ -27,6 +27,7 @@
import static org.junit.Assert.assertNotSame;
import javax.enterprise.inject.Default;
+import javax.inject.Inject;
import org.drools.runtime.StatefulKnowledgeSession;
import org.jboss.arquillian.api.Deployment;
@@ -60,8 +61,15 @@
return archive;
}
+
+ @Inject
+ DelegateBean delegateBean;
+
+ @Inject
+ @Default @DefaultConfig StatefulKnowledgeSession ksession;
+
@Test
- public void testDelegate(DelegateBean delegateBean, @Default @DefaultConfig StatefulKnowledgeSession ksession) {
+ public void testDelegate() {
assertNotNull(ksession);
assertNotNull(delegateBean);
ksession.fireAllRules();
Modified: modules/drools/trunk/pom.xml
===================================================================
--- modules/drools/trunk/pom.xml 2010-06-20 19:35:38 UTC (rev 13282)
+++ modules/drools/trunk/pom.xml 2010-06-21 17:27:48 UTC (rev 13283)
@@ -1,95 +1,100 @@
<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>
+ 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.jboss.seam</groupId>
- <artifactId>seam-parent</artifactId>
- <version>1</version>
- </parent>
+ <parent>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>seam-parent</artifactId>
+ <version>1</version>
+ </parent>
- <groupId>org.jboss.seam.drools</groupId>
- <artifactId>seam-drools-parent</artifactId>
- <packaging>pom</packaging>
- <version>3.0.0-SNAPSHOT</version>
- <name>Seam Drools Parent</name>
+ <artifactId>seam-drools-parent</artifactId>
+ <groupId>org.jboss.seam.drools</groupId>
+ <version>3.0.0-SNAPSHOT</version>
- <prerequisites>
- <maven>3.0</maven>
- </prerequisites>
+ <packaging>pom</packaging>
+ <name>Seam Drools Parent</name>
- <modules>
- <module>api</module>
- <module>impl</module>
- <module>docs</module>
- <!-- <module>examples</module> -->
- </modules>
+ <prerequisites>
+ <maven>3.0</maven>
+ </prerequisites>
- <developers>
- <developer>
- <name>Tihomir Surdilovic</name>
- <email>tsurdilo at redhat.com</email>
- <url>http://in.relation.to/Bloggers/Tihomir</url>
- <organization>JBoss, by Red Hat</organization>
- <organizationUrl>http://jboss.org</organizationUrl>
- <timezone>EST</timezone>
- <roles>
- <role>Module Lead</role>
- </roles>
- </developer>
- </developers>
+ <description>
+ The Parent for Seam Drools Modules
+ </description>
- <properties>
- <arquillian.version>1.0.0-SNAPSHOT</arquillian.version>
- <seam.version>3.0.0.b01</seam.version>
- </properties>
+ <url>http://www.seamframework.org</url>
- <dependencyManagement>
- <dependencies>
+ <modules>
+ <module>api</module>
+ <module>impl</module>
+ <module>docs</module>
+ <!-- <module>examples</module> -->
+ </modules>
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>seam</artifactId>
- <version>${seam.version}</version>
- <scope>import</scope>
- <type>pom</type>
- </dependency>
+ <developers>
+ <developer>
+ <name>Tihomir Surdilovic</name>
+ <email>tsurdilo at redhat.com</email>
+ <url>http://in.relation.to/Bloggers/Tihomir</url>
+ <organization>JBoss, by Red Hat</organization>
+ <organizationUrl>http://jboss.org</organizationUrl>
+ <timezone>EST</timezone>
+ <roles>
+ <role>Module Lead</role>
+ </roles>
+ </developer>
+ </developers>
- <!-- Override dependencyManagement from org.jboss.seam:seam -->
- <dependency>
- <groupId>org.jboss.seam.drools</groupId>
- <artifactId>seam-drools-api</artifactId>
- <version>${project.version}</version>
- </dependency>
+ <properties>
+ <seam.version>3.0.0.b01</seam.version>
+ </properties>
- <dependency>
- <groupId>org.jboss.seam.drools</groupId>
- <artifactId>seam-drools-impl</artifactId>
- <version>${project.version}</version>
- </dependency>
+ <dependencyManagement>
+ <dependencies>
- </dependencies>
- </dependencyManagement>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>seam</artifactId>
+ <version>${seam.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
- <profiles>
- <profile>
- <id>distribution</id>
- <activation>
- <property>
- <name>release</name>
- </property>
- </activation>
- <modules>
- <module>dist</module>
- <module>docs</module>
- </modules>
- </profile>
- </profiles>
+ <!-- Override dependencyManagement from org.jboss.seam:seam -->
+ <dependency>
+ <groupId>org.jboss.seam.drools</groupId>
+ <artifactId>seam-drools-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/drools/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/drools/trunk</developerConnection>
- <url>http://fisheye.jboss.org/browse/Seam/modules/drools/trunk</url>
- </scm>
+ <dependency>
+ <groupId>org.jboss.seam.drools</groupId>
+ <artifactId>seam-drools-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+ <profiles>
+ <profile>
+ <id>distribution</id>
+ <activation>
+ <property>
+ <name>release</name>
+ </property>
+ </activation>
+ <modules>
+ <module>dist</module>
+ <module>docs</module>
+ </modules>
+ </profile>
+ </profiles>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/drools/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/drools/trunk</developerConnection>
+ <url>http://fisheye.jboss.org/browse/Seam/modules/drools/trunk</url>
+ </scm>
+
</project>
More information about the seam-commits
mailing list