Getting started

To use JEDI, a user has to:

  1. compile JEDI or download the binaries
  2. create a JEDI configuration database
  3. configure JBoss application server
  4. deploy jedi.ear file
  5. run JEDI admin interface

In the following sections, the five steps are explained.

Compile JEDI or download the binaries

To compile the project there is an Ant file named build.xml located in the project tree.

So you can use directly Ant tool or import the project into your favorite RAD and compile it.

If you want to use JEDI without compiling it, you can download the binary version.

Top

Create a JEDI configuration database

JEDI needs at least a configuration database where to store all the managed documents.

The database used is Oracle 11g. Anyway, changing some configuration file, you can use a database of another vendor.

At first you have to create a schema named JEDI. Afterward execute the following scripts (located in setup/database folder) in order to create the configuration database:

  • JEDI-DDL.sql: creates the tables
  • JEDI-Seq.sql: creates the sequences
  • JEDI-Data.sql: writes some predefined configuration data

Top

Configure JBoss application server

JEDI application is designed for Java 7 and JBOSS Application server 7.1.1. but it can be installed on other J2EE AS, changing some configuration files.

In the next, the steps configuration for JBoss 7.1.1. and Oracle 11g are described.

Datasource

In order to connect to the configuration database, JEDI uses Hibernate framework as implementation of JPA. In the persistence.xml file, it is referenced a datasource, whose JNDI name is java:jboss/jdbc/JEDI-DS.

So you have to define, in your application server, a datasource with that JNDI name.

If you are using the JBoss standalone server, you must add the datasource definition into the datasources element of standalone.xml file, located in configuration folder. For the other cases read JBoss server documentation.

Here is an example of an Oracle datasource definition (you have to write to right information for the connection-url, user-name anda password elements):


    <datasource jta="true" jndi-name="java:jboss/jdbc/JEDI-DS"
            pool-name="JEDIPool" enabled="true" use-java-context="true" use-ccm="true"/>
        <connection-url>jdbc:oracle:thin:@dbmsserver:1521:mydb</connection-url>
        <driver>oracle</driver>
        <pool>
            <min-pool-size>1</min-pool-size>
            <max-pool-size>10</max-pool-size>
        </pool>
        <security>
            <user-name>username</user-name>
            <password>password</password>
        </security>
    </datasource>
		

Note that the previous datasource uses a driver, named oracle, that is defined in this way


    <drivers>
        <driver name="oracle" module="com.oracle.ojdbc6">
            <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
            <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
        </driver>
		

and uses a module, named com.oracle.ojdbc6. You can add this module to JBoss, extracting com.oracle.ojdbc6.zip file (located in setup/applicationserver folder) in jboss_home/modules folder.

Logging

JEDI uses Log4j as logging system (the channel is named senato.jedi) to write some activity information on a log file.

So you have to define, in your application server, the logging settings.

If you are using the JBoss standalone server, you can writes the following code into the subsystem logging element of standalone.xml file, located in configuration folder. For the other cases read JBoss server documentation.


	<subsystem xmlns="urn:jboss:domain:logging:1.1">		
		...
        	<periodic-rotating-file-handler name="JEDI_FILE">
	            <formatter>
	                <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
	            </formatter>
	            <file relative-to="jboss.server.log.dir" path="jedi.log"/>
	            <suffix value=".yyyy-MM-dd"/>
	            <append value="true"/>
	        </periodic-rotating-file-handler>
        
	        ...
	        
	        <logger category="senato.jedi">
	            <level name="DEBUG"/>
	            <handlers>
	                <handler name="JEDI_FILE"/>
	            </handlers>
	        </logger>            
		

Security

JEDI admin interface requires authentication and authorization definition (JAAS) in order to prevent illegal accesses to it. An user is allowed if he has JEDI_Admin role in a realm named other (this information is written in web.xml file).

If you have already an own realm available you can use it (and grant JEDI-Admin role to the authorized users). In the next we are using a simple realm created with JBoss tools (for further information read JBoss server documentation).

In this case you have to create application-users.properties and application-roles.properties files and the you add the following piece of code into the subsystem ecurity element of standalone.xml file, located in configuration folder.


    <security-domain name="other" cache-type="default">
        <authentication>
            <login-module code="Remoting" flag="optional">
                <module-option name="password-stacking" value="useFirstPass"/>
            </login-module>
            <login-module code="RealmUsersRoles" flag="required">
                <module-option name="usersProperties" value="${jboss.server.config.dir}/application-users.properties"/>
                <module-option name="rolesProperties" value="${jboss.server.config.dir}/application-roles.properties"/>
                <module-option name="realm" value="ApplicationRealm"/>
                <module-option name="password-stacking" value="useFirstPass"/>
            </login-module>
        </authentication>
    </security-domain>
		

Top

Deploy jedi.ear file

You have to copy jedi.ear file into the deployments folder of your JBoss application server.

Top

Run JEDI admin interface

Open you browser at the following address:


    http://<servername>:<port>/jedi/document/documentList.faces
			

then insert username and password and create your first managed document.

 

(page content was updated on 17/09/2013)