Drools Guvnor 5.0 Installation

    From Guvnor 5.2 onwards

    From Guvnor 5.2 onwards we'll be releasing specific wars for JBoss AS 5.1, JBoss AS 6 and Tomcat 6 (and maybe more - patches welcome) that deploy to those app servers out of the box.

    Drools Guvnor 5.0 on JBoss AS 5.0/5.1

     

    http://community.jboss.org/wiki/DroolsGuvnor50inJBossAS5

     

    Drools Guvnor 5.0 on Tomcat 6.x

     

    This instruction also applies to Tomcat: http://community.jboss.org/wiki/DroolsGuvnor50inJBossAS5

     

    Configure JAAS authentification with Tomcat: (Contributed by mohamed.ensi@gmail.com)

     

    1. We should have a JAAS LoginModule implemented that connect to a database
    and test if the user exists in the database.

    for example:
    public class JaasGuvnor implements LoginModule {
        public String userName;
        public String password;
        public boolean login(){
        return true if user exist and false if not
    }
    /*other methods to implement*/
    }

    2. open %TOMCAT_HOME%/conf/context.xml and you should configure your
    database, here I use Oracle
    <Resource name="jdbc/URDroolsDS"

                auth="Container"

                type="javax.sql.DataSource"

                driverClassName="oracle.jdbc.OracleDriver"

                url="jdbc:oracle:thin:@mamadou:1522:guvnor"

                username="drools"

                password="drools"

                maxActive="20"

                maxIdle="10"

                maxWait="-1"/>

        <Realm  className="org.apache.catalina.realm.JAASRealm"               

            appName="drools-guvnor"     

            userClassNames="com.test.User"     

            roleClassNames="com.test.Role"

            useContextClassLoader="false"/>

    3. add a file jaas.config on %TOMCAT_HOME%/conf
    drools-guvnor{

      com.test.JaasGuvnor required debug=true;

    };

    4. Before lunching Tomcat we add “set JAVA_OPTS=-Xmx256m
    -Djava.security.auth.login.config=%CATALINA_HOME%/conf/jaas.config”

    Drools Guvnor 5.0 on Oracle AS (OC4J) 10.1.3 (Contributed by mohamed.ensi@gmail.com)

     

    1. download oc4j (I use oc4j_extended_101350)
    2. extract the rar file
    3. Open the file data-source.xml %OC4J_HOME%/J2EE/home/config
    4. add the following lines
    <managed-data-source name="guvnor"
            connection-pool-name="drools-guvnor"
            jndi-name="jdbc/OracleDS" />
    <connection-pool name='drools-guvnor'
        num-cached-statements='32'>
        <connection-factory factory-class='org.hsqldb.jdbcDriver'
          user='sa'
          password=''
          url="jdbc:hsqldb:.">
        </connection-factory>
      </connection-pool>

    5. the following JARs are required
      - hsqldb.jar
      - hibernate-annotations.jar
      - hibernate-entitymanager.jar
      - hibernate3.jar
      - jboss-common.jar
      - dom4j.jar
      - commons-logging.jar
      - log4j.jar
      - commons-collections.jar
      - cglib.jar
      - jsf-api.jar
      - jsf-impl.jar

    start the server (the first start the server will need a password for
    manager)
    6. open the URL: http://localhost:8888/em
    7.authentificate with your password

    http://n3.nabble.com/file/n828422/image1.png

    8. go to application tab

    http://n3.nabble.com/file/n828422/image2.png

    9. click on deploy and browse to the war file location

    http://n3.nabble.com/file/n828422/image3.png

    10. click Next and give drools-guvnor as a name

    http://n3.nabble.com/file/n828422/image4.png

    11. click Next
    12. Finally click Deploy

    Verify that Guvnor is running well:  http://localhost:8888/drools-guvnor
    http://localhost:8888/drools-guvnor

     

     

    Guvnor 5.0 on Weblogic 11g and 10g AS (Contributed by mohamed.ensi@gmail.com)

     

    1. Install Weblogic AS
    2. create a new domain (quick start)
    http://n3.nabble.com/file/n831111/image1.png
    3. click "Getting started with Weblogic ..."
    http://n3.nabble.com/file/n831111/image2.png
    4. Click next -> next -> and give the domain name as guvnor
    http://n3.nabble.com/file/n831111/image3.png
    5. click next -> next-> and finally create
    6.go to start menu -> Oracle Weblogic -> User Projects -> guvnor -> start
    admin server for weblogic server domain
    7. open http://localhost:7001/console
    http://n3.nabble.com/file/n831111/image4.png
    8. give the password that you had specified on the domain creation
    9. click  "Deployments" (on the left)
    10. click "Install"
    http://n3.nabble.com/file/n831111/image6.png
    11. give the path of drools-guvnor directory (extract drools-guvnor on a
    directory)
    12. click next->next->...->finish
    13. now choose save
    14. click "Deployments" yand you will see drools-guvnor
    http://n3.nabble.com/file/n831111/image7.png
    15. click "Start" -> "Servicing all requests"

    but you will see some problem and the service couldn't be started 
    don't worry, we will fixe this in a moment

    16. Stop the server
    17. go to %WEBLOGIC_HOME%\user_projects\domains\guvnor\lib and add the
    following JARs
      - commons-beanutils-1.7.0.jar
      - commons-codec-1.3.jar
      - commons-collections-3.2.jar
      - commons-digester-1.8.jar
      - commons-discovery-0.4.jar
      - commons-logging-1.1.1.jar
      - myfaces-api-1.2.8.jar
      - myfaces-impl-1.2.8.jar
    18. open drools-guvnor\WEB-INF/lib and add the followin JARs
      - asm.jar
      - cglib.jar
      - commons-logging-1.1.1.jar
      - hibernate3.jar
      - hibernate-annotations.jar
      - hibernate-commons-annotations-3.1.0.GA.jar
      - hibernate-entitymanager.jar
      - log4j.jar
    19. open the file drools-guvnor\WEB-INF \components.xml and replace

    <core:init transaction-management-enabled="false"/>
    <transaction:no-transaction/>

    with : <core:init debug="true" jndi-pattern="\#{ejbName}/local" />

    20. In  <component name="repositoryConfiguration"> add:
      <property name="homeDirectory">E:/GuvnorRepo/</property>
    don't forget to create a "GuvnorRepo" directory on E:\

    21. start the server and enjoy with Guvnor on http//localhost
    :7001/drools-guvnor/

     

     

    Drools Guvnor 5.0 on WebSphere

     

    http://community.jboss.org/wiki/DeployingGuvnor5OnWebSphere