Version 3

    Notes on using Seam

    Here are Michael's notes on how he is integrating Seam as the back end. :

    1. modify root pom.xml to have special repo with Seam maven profiles:

        <!-- this is needed for Seam which is not in the jboss repo or the maven one in a useful form -->

    2. modify the drools-jbrms pom to use the appropriate profile depdendency:


    3. Modify the launch config for the hosted mode - only needs GWT and the jbrms project stuff (no other dependencies)

    NOTE: an external server will need to be started

    Add params to the launch for -noserver -port 8080

    This requires the external service to be started, and then the hosted browser can have same url as normal browser, but for debugging GUI.

    4. Something like the following deployment script is needed:

    mvn package -Dmaven.test.skip=true
    cp ./target/drools-jbrms.war /home/michael/apps/jboss-4.0.5.GA/server/default/deploy

    5. modify web.xml to look like :

      <display-name>Archetype Created Web Application</display-name>
            <filter-name>Seam Filter</filter-name>
            <filter-name>Seam Filter</filter-name>

    6. Add components.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <components xmlns=""
        <core:init debug="true"></core:init>
        <!--<security:identity authenticate-method="#{authenticator.authenticate}"></security:identity>               -->
        <!--        <component name="org.jboss.seam.theme.themeSelector">
            <property name="availableThemes">
            <property name="cookieEnabled">true</property>

    7. add to src/main/resources (empty is fine - is needed by Seam to bootstrap)

    8. Copy RemoteServiceServlet source from GWT into project, make JBRMS extend it - can insert code into processCall where it gets the interface, and the method, and lookup Seam beans instead.


    9. Can then do cool stuff with Seam annotations like:

    public class SeamHelper {
        private long stamp = System.currentTimeMillis();
        private SeamAnother another;
        private SeamEvent event;
        public void log() {


    public class SeamAnother {
        private long l = System.currentTimeMillis();
        public void log() {
            System.out.println("Session timestamp: " + l );


    @Name( "event" )
    public class SeamEvent {
        private long l = System.currentTimeMillis();
        public void log() {
            System.out.println("Event timestamp: " + l );