1. Digidoc
  2. Untitled project
  3. DoQuBookWeb

Overview

HTTPS SSH

Installation :

  • Clone the repository

    hg clone .....
    
  • Download JBoss as 7.1 (or higher)

    wget http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.zip
    unzip jboss-as-7.1.1.Final.zip
    
  • Configure JBoss :

    Add a data source in subl jboss-as-7.1.1.Final/standalone/configuration/standalone.xml Search for <datasources>, and add a datasource of jndi-name : java:jboss/datasources/doqubookweb

    For MySQL :

    Create a MySQL database first ! (localhost:3306/doqubookweb for example)

    <datasource jta="true" jndi-name="java:jboss/datasources/doqubookweb" pool-name="doqubookweb" enabled="true" use-java-context="true">
        <connection-url>jdbc:mysql://localhost:3306/doqubookweb</connection-url>
            <driver>mysql</driver>
            <security>
                <user-name>root</user-name>
                <password>root</password>
            </security>
            <statement>
                <prepared-statement-cache-size>100</prepared-statement-cache-size>
                <share-prepared-statements>true</share-prepared-statements>
            </statement>
    </datasource>
    

    You also need to add the mysql driver in <drivers>...</drivers>

    <driver name="mysql" module="com.mysql"/>
    

    And install the module :

    unzip ../jboss-conf/mysql-module.zip -d /opt/servers/jboss-as-7.1.1.Final/modules/com/
    

    For HSQL :

    <datasource jndi-name="java:jboss/datasources/doqubookweb" pool-name="doqubookweb" enabled="true" use-java-context="true">
        <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
        <driver>h2</driver>
        <security>
            <user-name>sa</user-name>
            <password>sa</password>
        </security>
    </datasource>
    
  • Start JBoss

    cd jboss-as-7.1.1.Final
    export JBOSS_HOME=.
    ./bin/standalone.sh -b 0.0.0.0
    
  • Compile and deploy :

    cd DoQuBookWeb
    mvn clean package  -Dmaven.test.skip=true
    cp ./target/*.war /.....///...../jboss-as-.......Final/standalone/deployments/
    http://localhost:8080/DoQuBookWeb