My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
SoftwareConfiguration  
DocDoku Software installation and configuration (after the environment has been setup).
Phase-Deploy
Updated Dec 10, 2010 by florent....@gmail.com

Introduction

Once the prerequisite softwares have been installed, it's time to deploy this application itself. This part is explained in this page.

The configuration of the application is made by editing two files ejb-jar.xml and web.xml. Theses files are located inside the DocDoku.ear under the path "DocDoku-ejb.jar/META-INF/ejb-jar.xml" and "DocDoku-war.war/WEB-INF/web.xml".

To modify theses two files, you can either extract the DocDoku.ear file (with the jar command), make the modifications and then recreate the archive file or perform the modifications directly inside the ear file. A tool like 7-zip on Windows is able to do that.

ejb-jar.xml

Here below an extract of the ejb-jar.xml:

...
    <session>
        <ejb-name>CommandBean</ejb-name>
        <env-entry>
            <env-entry-name>vaultPath</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>/var/lib/docdoku/vault</env-entry-value>
        </env-entry>
    </session>
    <session>
        <ejb-name>UserManagerBean</ejb-name>
        <env-entry>
            <env-entry-name>vaultPath</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <!--<env-entry-value>C:\docdoku\vault</env-entry-value>-->
            <env-entry-value>/var/lib/docdoku/vault</env-entry-value>
        </env-entry>
    </session>
    <session>
        <ejb-name>IndexSearcherBean</ejb-name>
        <env-entry>
            <env-entry-name>indexPath</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>/var/lib/docdoku/index</env-entry-value>
        </env-entry>
    </session>
    <message-driven>
        <ejb-name>MailerBean</ejb-name>
        <env-entry>
            <env-entry-name>codebase</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>http://localhost:8080</env-entry-value>            
        </env-entry>
    </message-driven>
    <message-driven>
        <ejb-name>IndexerBean</ejb-name>
        <env-entry>
            <env-entry-name>indexPath</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>/var/lib/docdoku/index</env-entry-value>
        </env-entry>
    </message-driven>
...

the parameters to set are:

vaultPath: the path where the files will be stored. "/var/lib/docdoku/vault" on the example, could be "C:\docdoku\vault" on Windows.

indexPath: the path of the index files, used by the full text engine. "/var/lib/docdoku/index" on the example, could be "C:\docdoku\index" on Windows.

codebase: this is the url on which the application is accessible.


web.xml

Here below an extract of the web.xml:

...
    <servlet>
        <servlet-name>UploadDownloadServlet</servlet-name>
        <servlet-class>com.docdoku.server.http.UploadDownloadServlet</servlet-class>
        <init-param>
            <param-name>PDF2SWF_HOME</param-name>
            <param-value>/usr/bin</param-value>
        </init-param>
        <init-param>
            <param-name>OO_HOME</param-name>
            <param-value>/usr/lib/openoffice</param-value>
        </init-param>
        <init-param>
            <param-name>OO_PORT</param-name>
            <param-value>8100</param-value>
        </init-param>
    </servlet>
...

the parameters to set are:

PDF2SWF_HOME: this is the path to the pdf2swf command. Probably "/usr/bin" on linux system or "C:\tools\SWFTools" on Windows.

OO_HOME: the path to the OpenOffice installation. "/usr/lib/openoffice" on the example, could be "C:\Program Files\OpenOffice.org 3" on Windows.

OO_PORT: the port on which OpenOffice will accept requests. "8100", the default port, should be fine.


Deployment

To deploy the modified DocDoku.ear, we have to start the glassfish server and log into the admin console (http://localhost:4848/). Then click on "Applications> Enterprise Applications> Deploy", browse your local drive to select the "DocDoku.ear" file and upload it to the server.

After that, the application is deployed and you can start using it at http://localhost:8080.


Sign in to add a comment
Powered by Google Project Hosting