Seam SVN: r12540 - in modules/jms/trunk: dist and 1 other directories.
by seam-commits@lists.jboss.org
Author: jganoff
Date: 2010-04-20 21:06:48 -0400 (Tue, 20 Apr 2010)
New Revision: 12540
Added:
modules/jms/trunk/dist/
modules/jms/trunk/dist/assembly.xml
modules/jms/trunk/dist/pom.xml
Removed:
modules/jms/trunk/assembly.xml
Modified:
modules/jms/trunk/impl/pom.xml
modules/jms/trunk/pom.xml
Log:
Restructured assembly building to new seam-jms-dist module
Deleted: modules/jms/trunk/assembly.xml
===================================================================
--- modules/jms/trunk/assembly.xml 2010-04-21 00:06:54 UTC (rev 12539)
+++ modules/jms/trunk/assembly.xml 2010-04-21 01:06:48 UTC (rev 12540)
@@ -1,79 +0,0 @@
-<assembly
- xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
- <id>bin</id>
- <formats>
- <format>zip</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
-
- <fileSets>
- <fileSet>
- <directory>.</directory>
- <outputDirectory>seam-jms</outputDirectory>
- <includes>
- <include>readme.txt</include>
- <include>lgpl.txt</include>
- </includes>
- </fileSet>
-
- <fileSet>
- <directory>api/src/main/java</directory>
- <outputDirectory>seam-jms/source</outputDirectory>
- <includes>
- <include>**</include>
- </includes>
- </fileSet>
-
- <fileSet>
- <directory>impl/src/main/java</directory>
- <outputDirectory>seam-jms/source</outputDirectory>
- <includes>
- <include>**</include>
- </includes>
- </fileSet>
- </fileSets>
-
- <dependencySets>
- <dependencySet>
- <outputDirectory>seam-jms/lib</outputDirectory>
- <useProjectArtifact>false</useProjectArtifact>
- <includes>
- <include>org.jboss.weld:weld-extensions</include>
- </includes>
- </dependencySet>
- </dependencySets>
-
- <moduleSets>
- <moduleSet>
- <includes>
- <include>org.jboss.seam:seam-jms:jar</include>
- </includes>
- <binaries>
- <outputDirectory>seam-jms/lib</outputDirectory>
- <unpack>false</unpack>
- </binaries>
- </moduleSet>
-
- <moduleSet>
- <includes>
- <include>org.jboss.seam:seam-jms-impl:jar</include>
- </includes>
- <binaries>
- <outputDirectory>seam-jms/lib</outputDirectory>
- <unpack>false</unpack>
- </binaries>
- </moduleSet>
-
- <moduleSet>
- <includes>
- <include>org.jboss.seam:seam-jms-reference-guide</include>
- </includes>
- <binaries>
- <outputDirectory>seam-jms/doc/reference</outputDirectory>
- <unpack>true</unpack>
- </binaries>
- </moduleSet>
- </moduleSets>
-</assembly>
\ No newline at end of file
Property changes on: modules/jms/trunk/dist
___________________________________________________________________
Name: svn:ignore
+ target
Copied: modules/jms/trunk/dist/assembly.xml (from rev 12521, modules/jms/trunk/assembly.xml)
===================================================================
--- modules/jms/trunk/dist/assembly.xml (rev 0)
+++ modules/jms/trunk/dist/assembly.xml 2010-04-21 01:06:48 UTC (rev 12540)
@@ -0,0 +1,59 @@
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>distribution</id>
+
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>..</directory>
+ <outputDirectory>seam-jms</outputDirectory>
+ <includes>
+ <include>readme.txt</include>
+ <include>lgpl.txt</include>
+ </includes>
+ </fileSet>
+
+ <!-- Pull in docbook artifacts -->
+ <fileSet>
+ <directory>../docs/reference/target/docbook/publish</directory>
+ <outputDirectory>seam-jms/doc/reference</outputDirectory>
+ </fileSet>
+
+ <!-- Layer sources from API and IMPL projects -->
+ <fileSet>
+ <directory>../api/src/main/java</directory>
+ <outputDirectory>seam-jms/source</outputDirectory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </fileSet>
+
+ <fileSet>
+ <directory>../impl/src/main/java</directory>
+ <outputDirectory>seam-jms/source</outputDirectory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+
+ <!-- Add necessary binaries -->
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>seam-jms/lib</outputDirectory>
+ <useProjectArtifact>false</useProjectArtifact>
+ <includes>
+ <include>org.jboss.seam:seam-jms</include>
+ <include>org.jboss.seam:seam-jms-impl</include>
+ <include>org.jboss.weld:weld-extensions</include>
+ </includes>
+ </dependencySet>
+ </dependencySets>
+</assembly>
\ No newline at end of file
Added: modules/jms/trunk/dist/pom.xml
===================================================================
--- modules/jms/trunk/dist/pom.xml (rev 0)
+++ modules/jms/trunk/dist/pom.xml 2010-04-21 01:06:48 UTC (rev 12540)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.jboss.seam</groupId>
+ <artifactId>seam-jms-parent</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>seam-jms-dist</artifactId>
+ <name>Seam JMS Distribution</name>
+ <description>Builds a proper Seam JMS release distribution</description>
+ <packaging>pom</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>seam-jms</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>seam-jms-impl</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-extensions</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-5</version>
+ <configuration>
+ <descriptors>
+ <descriptor>assembly.xml</descriptor>
+ </descriptors>
+ </configuration>
+ <executions>
+ <execution>
+ <id>distribution</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Modified: modules/jms/trunk/impl/pom.xml
===================================================================
--- modules/jms/trunk/impl/pom.xml 2010-04-21 00:06:54 UTC (rev 12539)
+++ modules/jms/trunk/impl/pom.xml 2010-04-21 01:06:48 UTC (rev 12540)
@@ -63,12 +63,4 @@
<scope>test</scope>
</dependency>
</dependencies>
-
- <!--
- No JBoss SVN yet <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/jms/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/jms/trunk</developerConnection>
- <url>http://fisheye.jboss.org/browse/Seam/modules/jms/trunk</url>
- </scm>
- -->
</project>
Modified: modules/jms/trunk/pom.xml
===================================================================
--- modules/jms/trunk/pom.xml 2010-04-21 00:06:54 UTC (rev 12539)
+++ modules/jms/trunk/pom.xml 2010-04-21 01:06:48 UTC (rev 12540)
@@ -15,6 +15,10 @@
<name>Seam JMS Parent</name>
<version>3.0.0-SNAPSHOT</version>
+ <properties>
+ <seamJmsVersion>3.0.0-SNAPSHOT</seamJmsVersion>
+ </properties>
+
<modules>
<module>api</module>
<module>impl</module>
@@ -22,6 +26,7 @@
<!--
<module>examples</module>
-->
+ <module>dist</module>
</modules>
<developers>
@@ -34,20 +39,6 @@
</developer>
</developers>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-5</version>
- <configuration>
- <descriptors>
- <descriptor>assembly.xml</descriptor>
- </descriptors>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
<dependencyManagement>
<dependencies>
<dependency>
@@ -61,6 +52,19 @@
<artifactId>weld-extensions</artifactId>
<version>1.0.0.Alpha1</version>
</dependency>
+
+ <!-- Modules defined again here to prevent need to explicitly specify version where used -->
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>seam-jms</artifactId>
+ <version>${seamJmsVersion}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>seam-jms-impl</artifactId>
+ <version>${seamJmsVersion}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
16 years
Seam SVN: r12539 - modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap.
by seam-commits@lists.jboss.org
Author: swd847
Date: 2010-04-20 20:06:54 -0400 (Tue, 20 Apr 2010)
New Revision: 12539
Modified:
modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java
Log:
changes to generic beans, now generic beans are created for subclasses of the main type
Modified: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java 2010-04-20 23:35:21 UTC (rev 12538)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java 2010-04-21 00:06:54 UTC (rev 12539)
@@ -150,9 +150,18 @@
}
for (BeanResult<?> bb : r.getBeans())
{
- if (genericBeans.containsKey(bb.getType()))
+ GenericBeanResult found = null;
+ for(Class g : genericBeans.keySet())
{
- List<AnnotatedType<?>> types = processGenericBeans(bb, genericBeans.get(bb.getType()), beanManager);
+ if(g.isAssignableFrom(bb.getType()))
+ {
+ found = genericBeans.get(g);
+ break;
+ }
+ }
+ if (found != null)
+ {
+ List<AnnotatedType<?>> types = processGenericBeans(bb, found, beanManager);
for (AnnotatedType<?> i : types)
{
event.addAnnotatedType(i);
@@ -336,7 +345,6 @@
if (m.isAnnotationPresent(ApplyQualifiers.class))
{
-
if(!isQualifierPresent(m, beanManager))
{
gb.addToMethod(m.getJavaMember(), new DefaultLiteral());
16 years
Seam SVN: r12538 - in modules/jms/trunk: impl and 1 other directory.
by seam-commits@lists.jboss.org
Author: jganoff
Date: 2010-04-20 19:35:21 -0400 (Tue, 20 Apr 2010)
New Revision: 12538
Modified:
modules/jms/trunk/api/
modules/jms/trunk/impl/
Log:
Updated svn:ignore with eclipse project files on api and impl projects
Property changes on: modules/jms/trunk/api
___________________________________________________________________
Name: svn:ignore
- target
+ target
.classpath
.project
.settings
Property changes on: modules/jms/trunk/impl
___________________________________________________________________
Name: svn:ignore
- target
+ target
.classpath
.project
.settings
transaction.log
16 years
Seam SVN: r12537 - modules/faces/trunk/docs/reference/src/main/docbook/en-US.
by seam-commits@lists.jboss.org
Author: nickarls
Date: 2010-04-20 17:39:22 -0400 (Tue, 20 Apr 2010)
New Revision: 12537
Modified:
modules/faces/trunk/docs/reference/src/main/docbook/en-US/events.xml
Log:
@View docs
Modified: modules/faces/trunk/docs/reference/src/main/docbook/en-US/events.xml
===================================================================
--- modules/faces/trunk/docs/reference/src/main/docbook/en-US/events.xml 2010-04-20 20:51:08 UTC (rev 12536)
+++ modules/faces/trunk/docs/reference/src/main/docbook/en-US/events.xml 2010-04-20 21:39:22 UTC (rev 12537)
@@ -178,7 +178,7 @@
</row>
<row>
<entry>PostConstructViewMapEvent</entry>
- <entry>component</entry>
+ <entry>view</entry>
<entry>After a view map was created</entry>
</row>
<row>
@@ -193,7 +193,7 @@
</row>
<row>
<entry>PreDestroyViewMapEvent</entry>
- <entry>component</entry>
+ <entry>view</entry>
<entry>Before a view map has been restored</entry>
</row>
<row>
@@ -208,7 +208,7 @@
</row>
<row>
<entry>PreRenderViewEvent</entry>
- <entry>component</entry>
+ <entry>view</entry>
<entry>Before a view has been rendered</entry>
</row>
<row>
@@ -244,14 +244,18 @@
</tbody>
</tgroup>
</informaltable>
- There is only one qualifier, <literal>@Component</literal> that can be used with component events by specifying the component ID. Note that
- view-centric component events <literal>PreRenderViewEvent</literal>, <literal>PostConstructViewMapEvent</literal> and
- <literal>PreDestroyViewMapEvent</literal> do not fire with the <literal>@Component</literal> qualifier.
+ Component events can further be qualified with the <literal>@Component</literal> qualifer, which takes the component id
+ as the value. The corresponding qualifier for view events is <literal>@View</literal>.
<programlisting role="Java">
public void observePrePasswordValidation(@Observes @Component("form:password") PreValidateEvent e)
{
// Do something with the "before password is validated" event object
} </programlisting>
+ <programlisting role="Java">
+public void observePreFooViewRendered(@Observes @View("/foo.xhtml") PreRenderViewEvent e)
+{
+ // Do something with the "before view is rendered" event object
+} </programlisting>
Global system events are observer without the component qualifier
<programlisting role="Java">
public void observeApplicationConstructed(@Observes PostConstructApplicationEvent e)
16 years
Seam SVN: r12536 - modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http.
by seam-commits@lists.jboss.org
Author: nickarls
Date: 2010-04-20 16:51:08 -0400 (Tue, 20 Apr 2010)
New Revision: 12536
Modified:
modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/HttpArtifacts.java
modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/HttpUserArtifacts.java
Log:
Tinkering with HTTP artifact producers
Modified: modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/HttpArtifacts.java
===================================================================
--- modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/HttpArtifacts.java 2010-04-20 20:29:16 UTC (rev 12535)
+++ modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/HttpArtifacts.java 2010-04-20 20:51:08 UTC (rev 12536)
@@ -23,22 +23,23 @@
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.event.Observes;
+import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.BeanManager;
import javax.inject.Inject;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
+import org.jboss.seam.servlet.event.qualifier.Destroyed;
import org.jboss.seam.servlet.event.qualifier.Initialized;
+import org.slf4j.Logger;
/**
*
* @author Nicklas Karlsson
*
* A source for HTTP artifacts. It observes for and stores the
- * ServletContext, HttpServletRequest and HttpSession objects. It also
- * produces the request values for @HttpParam
+ * ServletContext and provides the HttpSession and ServletRequest
+ * objects
*/
@ApplicationScoped
public class HttpArtifacts
@@ -46,61 +47,28 @@
private ServletContext servletContext;
@Inject
- HttpUserArtifacts httpUserArtifacts;
-
- @Inject
BeanManager beanManager;
+
+ @Inject Logger log;
- protected void pickup(@Observes @Initialized ServletContextEvent e)
+ protected void contextInitialized(@Observes @Initialized ServletContextEvent e)
{
+ log.debug("Servlet context initialized with event #0", e);
servletContext = e.getServletContext();
servletContext.setAttribute(BeanManager.class.getName(), beanManager);
}
- /**
- * Gets the current servlet context
- *
- * @throws IllegalStateException if the servlet context has not been set
- * @return The servlet context
- */
+ protected void contextDestroyed(@Observes @Destroyed ServletContextEvent e)
+ {
+ log.debug("Servlet context destroyed with event #0", e);
+ servletContext = null;
+ }
+
+ @Produces
+ @ApplicationScoped
public ServletContext getServletContext()
{
- if (servletContext == null)
- {
- throw new IllegalStateException("Servlet Context is not set");
- }
return servletContext;
}
- /**
- * Gets the current HTTP servlet request
- *
- * @throws IllegalStateException if the request has not been set
- * @return the request
- */
- public HttpServletRequest getRequest()
- {
- HttpServletRequest request = httpUserArtifacts.getRequest();
- if (request == null)
- {
- throw new IllegalStateException("HTTP servlet request is not set");
- }
- return request;
- }
-
- /**
- * Gets the current HTTP session
- *
- * @throws IllegalStateException if the session has not been set
- * @return the session
- */
- public HttpSession getSession()
- {
- HttpSession session = httpUserArtifacts.getSession();
- if (session == null)
- {
- throw new IllegalStateException("HTTP session is not set");
- }
- return session;
- }
}
\ No newline at end of file
Modified: modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/HttpUserArtifacts.java
===================================================================
--- modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/HttpUserArtifacts.java 2010-04-20 20:29:16 UTC (rev 12535)
+++ modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/HttpUserArtifacts.java 2010-04-20 20:51:08 UTC (rev 12536)
@@ -36,7 +36,6 @@
import org.jboss.seam.servlet.event.qualifier.Created;
import org.jboss.seam.servlet.event.qualifier.Destroyed;
import org.jboss.seam.servlet.event.qualifier.Initialized;
-import org.jboss.seam.servlet.http.RequestParameter;
import org.slf4j.Logger;
/**
@@ -48,7 +47,7 @@
@RequestScoped
public class HttpUserArtifacts implements Serializable
{
- private static final long serialVersionUID = 5191073522575178427L;
+ private static final long serialVersionUID = 1L;
private HttpSession session;
private HttpServletRequest request;
@@ -60,7 +59,6 @@
{
log.trace("Servlet request initialized with event #0", e);
request = (HttpServletRequest) e.getServletRequest();
- session = request.getSession();
}
protected void requestDestroyed(@Observes @Destroyed ServletRequestEvent e)
@@ -81,11 +79,15 @@
session = null;
}
+ @Produces
+ @RequestScoped
protected HttpSession getSession()
{
return session;
}
+ @Produces
+ @RequestScoped
protected HttpServletRequest getRequest()
{
return request;
16 years
Seam SVN: r12535 - tags.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-04-20 16:29:16 -0400 (Tue, 20 Apr 2010)
New Revision: 12535
Added:
tags/JBPAPP_4_3_CP08_CR2/
Log:
tagged Seam 2.0.2.FP for coming 4.3.8 CP
Copied: tags/JBPAPP_4_3_CP08_CR2 (from rev 12534, branches/enterprise/JBPAPP_4_3_FP01)
16 years
Seam SVN: r12534 - tags.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-04-20 16:24:32 -0400 (Tue, 20 Apr 2010)
New Revision: 12534
Added:
tags/JBPAPP_4_2_CP09_CR2/
Log:
tagged Seam 1.2.1.AP for coming EAP 4.2.9 and 4.3.8 CPs CR2
Copied: tags/JBPAPP_4_2_CP09_CR2 (from rev 12533, branches/enterprise/JBPAPP_4_2_CP01)
16 years
Seam SVN: r12533 - in modules/drools/trunk/impl/src/test: java/org/jboss/seam/drools/test/flow and 5 other directories.
by seam-commits@lists.jboss.org
Author: tsurdilovic
Date: 2010-04-20 15:48:43 -0400 (Tue, 20 Apr 2010)
New Revision: 12533
Added:
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTest.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTestFilter.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/Person.java
modules/drools/trunk/impl/src/test/resources/META-INF/TestWorkDefinitions.conf
modules/drools/trunk/impl/src/test/resources/META-INF/drools.rulebase.conf
modules/drools/trunk/impl/src/test/resources/icons/
modules/drools/trunk/impl/src/test/resources/icons/seamlogo.png
modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/flow/
modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/flow/FlowTest-beans.xml
modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/flow/flowtest.drl
modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/flow/flowtest.rf
Log:
added simple flow test.
Added: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTest.java (rev 0)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTest.java 2010-04-20 19:48:43 UTC (rev 12533)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.drools.test.flow;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertNotSame;
+
+import java.util.ArrayList;
+
+import javax.enterprise.inject.Default;
+import javax.inject.Inject;
+
+import org.drools.runtime.StatefulKnowledgeSession;
+import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.seam.drools.KnowledgeBaseProducer;
+import org.jboss.seam.drools.qualifiers.config.DefaultConfig;
+import org.jboss.shrinkwrap.api.ArchivePaths;
+import org.jboss.shrinkwrap.api.Archives;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.weld.extensions.resources.ResourceProvider;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+(a)RunWith(Arquillian.class)
+public class FlowTest
+{
+ @Deployment
+ public static JavaArchive createTestArchive()
+ {
+ String pkgPath = FlowTest.class.getPackage().getName().replaceAll("\\.", "/");
+ JavaArchive archive = Archives.create("test.jar", JavaArchive.class)
+ .addPackages(true, new FlowTestFilter(), KnowledgeBaseProducer.class.getPackage())
+ .addPackages(true, ResourceProvider.class.getPackage())
+ .addClass(Person.class)
+ .addResource(pkgPath + "/flowtest.drl", ArchivePaths.create("flowtest.drl"))
+ .addResource(pkgPath + "/flowtest.rf", ArchivePaths.create("flowtest.rf"))
+ //.addResource(pkgPath + "/kbuilderconfig.properties", ArchivePaths.create("kbuilderconfig.properties"))
+ //.addResource(pkgPath + "/kbaseconfig.properties", ArchivePaths.create("kbaseconfig.properties"))
+ .addManifestResource(pkgPath + "/FlowTest-beans.xml", ArchivePaths.create("beans.xml"));
+ //System.out.println(archive.toString(Formatters.VERBOSE));
+ return archive;
+ }
+
+ @Inject @Default @DefaultConfig StatefulKnowledgeSession ksession;
+
+ @SuppressWarnings("unchecked")
+ @Test
+ public void testFlow() {
+ assertNotNull(ksession);
+ ksession.setGlobal("errors", new ArrayList<String>());
+ ksession.insert(new Person("Tihomir", ""));
+
+ ksession.startProcess("validationflow");
+ ksession.fireAllRules();
+
+ assertTrue( ((ArrayList<String>) ksession.getGlobal("errors")).size() == 1 );
+ assertTrue(((ArrayList<String>) ksession.getGlobal("errors")).get(0).equals("You must enter a Telephone Number"));
+
+
+ }
+}
Added: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTestFilter.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTestFilter.java (rev 0)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTestFilter.java 2010-04-20 19:48:43 UTC (rev 12533)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.drools.test.flow;
+
+import org.jboss.shrinkwrap.api.Filter;
+
+public class FlowTestFilter implements Filter<Class<?>>
+{
+
+ public boolean include(Class<?> clazz)
+ {
+ // exclude classes in all other test packages except your own
+ if(clazz.getPackage().getName().startsWith("org.jboss.seam.drools.test")
+ && !clazz.getPackage().getName().equals(FlowTestFilter.class.getPackage().getName())) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+}
Added: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/Person.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/Person.java (rev 0)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/Person.java 2010-04-20 19:48:43 UTC (rev 12533)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.drools.test.flow;
+
+public class Person
+{
+ private String name;
+ private String telephoneNumber;
+
+ public Person(String name, String telphoneNumber) {
+ this.name = name;
+ this.telephoneNumber = telphoneNumber;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+ public String getTelephoneNumber()
+ {
+ return telephoneNumber;
+ }
+ public void setTelephoneNumber(String telephoneNumber)
+ {
+ this.telephoneNumber = telephoneNumber;
+ }
+
+
+}
Added: modules/drools/trunk/impl/src/test/resources/META-INF/TestWorkDefinitions.conf
===================================================================
--- modules/drools/trunk/impl/src/test/resources/META-INF/TestWorkDefinitions.conf (rev 0)
+++ modules/drools/trunk/impl/src/test/resources/META-INF/TestWorkDefinitions.conf 2010-04-20 19:48:43 UTC (rev 12533)
@@ -0,0 +1,15 @@
+import org.drools.process.core.datatype.impl.type.StringDataType;
+[
+ // the Notification work item
+ [
+ "name" : "Notification",
+ "parameters" : [
+ "Message" : new StringDataType(),
+ "From" : new StringDataType(),
+ "To" : new StringDataType(),
+ "Priority" : new StringDataType(),
+ ],
+ "displayName" : "Notification",
+ "icon" : "icons/seamlogo.gif"
+ ]
+]
\ No newline at end of file
Added: modules/drools/trunk/impl/src/test/resources/META-INF/drools.rulebase.conf
===================================================================
--- modules/drools/trunk/impl/src/test/resources/META-INF/drools.rulebase.conf (rev 0)
+++ modules/drools/trunk/impl/src/test/resources/META-INF/drools.rulebase.conf 2010-04-20 19:48:43 UTC (rev 12533)
@@ -0,0 +1 @@
+drools.workDefinitions = TestWorkDefinitions.conf
\ No newline at end of file
Added: modules/drools/trunk/impl/src/test/resources/icons/seamlogo.png
===================================================================
(Binary files differ)
Property changes on: modules/drools/trunk/impl/src/test/resources/icons/seamlogo.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/flow/FlowTest-beans.xml
===================================================================
--- modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/flow/FlowTest-beans.xml (rev 0)
+++ modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/flow/FlowTest-beans.xml 2010-04-20 19:48:43 UTC (rev 12533)
@@ -0,0 +1,35 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright ${year}, Red Hat, Inc., and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:s="urn:java:seam:core"
+ xmlns:d="urn:java:org.jboss.seam.drools:org.jboss.seam.drools.config"
+ xmlns:test="urn:java:org.jboss.seam.drools.test.ksession">
+
+ <d:DefaultRuleResources>
+ <s:specializes/>
+ <d:resources>
+ <s:value>classpath;flowtest.drl;DRL</s:value>
+ <s:value>classpath;flowtest.rf;DRF</s:value>
+ </d:resources>
+ </d:DefaultRuleResources>
+
+</beans>
Added: modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/flow/flowtest.drl
===================================================================
--- modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/flow/flowtest.drl (rev 0)
+++ modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/flow/flowtest.drl 2010-04-20 19:48:43 UTC (rev 12533)
@@ -0,0 +1,21 @@
+package org.jboss.seam.drools.test.flow
+
+import org.jboss.seam.drools.test.flow.Person;
+
+global java.util.ArrayList errors;
+
+rule "Person Name Validation"
+ruleflow-group "datavalidation"
+when
+ Person(name == "")
+then
+ errors.add("You must enter a Person Name");
+end
+
+rule "Person Phone Number Validation"
+ruleflow-group "datavalidation"
+when
+ Person(telephoneNumber == "")
+then
+ errors.add("You must enter a Telephone Number");
+end
\ No newline at end of file
Added: modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/flow/flowtest.rf
===================================================================
--- modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/flow/flowtest.rf (rev 0)
+++ modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/flow/flowtest.rf 2010-04-20 19:48:43 UTC (rev 12533)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<process xmlns="http://drools.org/drools-5.0/process"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
+ xs:schemaLocation="http://drools.org/drools-5.0/process drools-processes-5.0.xsd"
+ type="RuleFlow" name="validationflow" id="validationflow" package-name="org.jboss.seam.drools.test.flow" >
+
+ <header>
+ </header>
+
+ <nodes>
+ <start id="1" name="Start" x="16" y="16" width="48" height="48" />
+ <end id="2" name="End" x="208" y="20" width="80" height="40" />
+ <ruleSet id="3" name="Validation" x="96" y="20" width="80" height="40" ruleFlowGroup="datavalidation" />
+ </nodes>
+
+ <connections>
+ <connection from="3" to="2" />
+ <connection from="1" to="3" />
+ </connections>
+
+</process>
\ No newline at end of file
16 years
Seam SVN: r12532 - branches/enterprise/JBPAPP_4_3_FP01.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-04-20 14:53:34 -0400 (Tue, 20 Apr 2010)
New Revision: 12532
Modified:
branches/enterprise/JBPAPP_4_3_FP01/build.xml
Log:
extended valid ant versions
Modified: branches/enterprise/JBPAPP_4_3_FP01/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/build.xml 2010-04-20 18:52:42 UTC (rev 12531)
+++ branches/enterprise/JBPAPP_4_3_FP01/build.xml 2010-04-20 18:53:34 UTC (rev 12532)
@@ -1,9 +1,12 @@
<?xml version="1.0"?>
<project name="Seam" default="build" basedir="." xmlns:artifact="urn:maven-artifact-ant">
- <!-- Check that we are using Ant 1.6.5. -->
+ <!-- Check that we are using Ant 1.6.5 or 1.7.0. -->
<condition property="compatible.ant">
- <contains string="${ant.version}" substring="1.6.5"/>
+ <or>
+ <contains string="${ant.version}" substring="1.6.5"/>
+ <contains string="${ant.version}" substring="1.7.0"/>
+ </or>
</condition>
<fail unless="compatible.ant">You are using ${ant.version}. You must use Ant 1.6.5 to build Seam FP. </fail>
16 years
Seam SVN: r12531 - branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/init.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-04-20 14:52:42 -0400 (Tue, 20 Apr 2010)
New Revision: 12531
Modified:
branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/init/Initialization.java
Log:
back ported JBSEAM-3996
Modified: branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/init/Initialization.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/init/Initialization.java 2010-04-20 16:27:27 UTC (rev 12530)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/init/Initialization.java 2010-04-20 18:52:42 UTC (rev 12531)
@@ -539,11 +539,16 @@
break;
}
}
-
- throw new IllegalStateException("Two components with the same name and precedence - " +
+ // for the same component name and the same class in classpath don't throw exception,
+ // use the first in classpath as standard order - JBSEAM-3996
+ Class clazz = descriptor.getComponentClass();
+ if (!clazz.getName().equals(other.getComponentClass().getName()))
+ {
+ throw new IllegalStateException("Two components with the same name and precedence - " +
"component name: " + name + ", component classes: " +
descriptor.getComponentClass().getName() + ", " +
(other != null ? other.getComponentClass().getName() : "<unknown>"));
+ }
}
}
16 years