Projects‎ > ‎

Server Packaging


Candidates to move:

Architecture or development section:  directory structure and packaging of our jars.

Installation Section:  Server configuration details.


This design document describes the proposed packaging for the 2.0 version. This includes significant refactoring of the API due to the scattered in inappropriate places in the 1.x design due to the addition of additional features over time.

The idea is to prepare the framework to become a server implementation which manages session and authentication. This is the reason for the com.openptk.server package structure and the new engine and session packages. Also at the end of the document, the package structure for the consumer tier is proposed to change to the org.openptk.consumer package.


SVN directory Structure

trunk/openptk/

ext/
  Service/
    JDBC/
      src/
        java/
    JNDI/
      src/
        java/
    SPML/
      src/
        java/
    SPML2/
      src/
        java/
  Misc/
    Apache/
    LDAP/
    Sun/
    SPML2/
      src/
        java/
projects/
  Apps/
    CLI/
      bin/
      lib/
      src/
        java/
    Portlets/
      src/
        java/
      web/
    UserManagementLite/
      web/
  OpenPTK/
    Base/
      src/
        java/
    Client/
      src/
        java/
    Framework/
      src/
        java/
    Server/
      src/
        java/
      web/
    Service/
      src/
        java/
    Taglib/
      src/
        java/
  Samples/
    Auth/
      bin/
      lib/
      src/
        java/
    Client/
      bin/
      lib/
      src/
        java/
    Framework/
      bin/
      lib/
      src/
        java/
    Taglib/
      web/  

Server Configuration

The configuration will include a new section for server properties. The following is a list of some the the new properties:

Property Name Description
session.cookie Name of the session cookie. The default name will be openptksession
session.cache.ttl The time to live for search results
results.quantity the number of default subjects to return in a list

Other server configuraiton variables are expected. These new properties will be containd in the openptk.xml file in a server section. The xsd and configuration process will be extended to support reading these values.

There are 3 current server configuration properties.

          <Global>
             <Properties>
                <Property name="auth.token.httpheader"              value="openptkid" />              
                <Property name="http.session.cookie.uniqueid"            value="OPENPTKSESSIONID" />
                <Property name="http.session.cookie.httponly"            value="true" />           
                <Property name="engine.session.ttl"                        value="1800000" />
                <Property name="engine.session.cache.ttl"                  value="120000" />
                <Property name="search.results.quantity"                   value="10" />
                <Property name="search.attribute.default"           value="firstname" />
             </Properties>
          </Global>
  1. Cookie Name
    Resource.java
    COOKIE_SESSIONID
    Status: Resource.java is getting this from the context
  2. TTL
    CacheIF had a private TTL variable
  3. Quantity:
    SubjectRepresentation - this currently includes a private DEFAULT_PAGE_QUANTITY variable.
    -only used in this class
    Status: TBD after design discussion

Design agreed to is that the Engine will be modified to subclass Component.java and the getters and setters for Properties on the Engine will store the server configuration properties

For each server property added to the openptk.xml must also be added to the EngineIF

   // The following Strings are the names of the server configuration properties in the openptk.xml
   public static final String AUTH_TOKEN_HTTPHEADER =  "auth.token.httpheader";
   public static final String HTTP_SESSION_COOKIE_UNIQUEID =  "http.session.cookie.uniqueid";
   public static final String HTTP_SESSION_COOKIE_HTTPONLY =  "http.session.cookie.httponly";
   public static final String ENGINE_SESSION_TTL =  "engine.session.ttl";
   public static final String ENGINE_SESSION_CACHE_TTL =  "engine.session.cache.ttl";   
   public static final String SEARCH_RESULTS_QUANTITY =  "search.results.quantity";    
   public static final String SEARCH_ATTRIBUTE_DEFAULT =  "search.attribute.default"; 

Server Context Root of the web app

The default server context root used will be /openptk. It is expected that this value can change during a deployment. This change of the context root will impact several things. This is a list of the expected configuration changes that will need to be documented for the deployer to change.

Configuration Location Description
Engine Properties This is used internally by things like the AuthFilter to set the cookie path to a known value.
Javascript baseURI This is used by the javascript to locate the REST resources.

WAR file configuration

The table below defines what jar files are needed for a particular J2EE Web Container.


The Web Container MUST run Java SE 6

Legend:

Required
  Optional, based on implementation
jar file Description Used by Glassfish V3
(NetBeans 6.8)
Tomcat 6 Weblogic 10.3.2.0
(JDeveloper 11.1.1.2.0)
Note
asm-3.1.jar JAX-RS: bytecode manipulation framework (core)   R R Jersey uses this
idm_80_openspml.jar Sun IDM implementation of OpenSPML toolkit (v1) Service: SPML w/Sun IDM O O O If using SPML Service
idm_8_openspml2-toolkit.jar Sun IDM implementation of OpenSPML toolkit (v2) Service: SPML2 w/Sun IDM O O O If using SPML2 Service
idmclient.jar Sun IDM enhancements to OpenSPML Service: SPML w/Sun IDM O O O If using SPML or SPML2 Service
jersey-client-1.1.4.jar JAX-RS: Jersey client API implementation (core)   R R Server has client-side code in the UI
jersey-core-1.1.4.jar JAX-RS: Jersey core API implementation (core)   R R  
jersey-server-1.1.4.jar JAX-RS: Jersey server API implementation (core)   R R  
jsr311-api-1.1.1.jar JAX-RS: Reference implement of JSR311 (core)   R R  
log4j-1.2.15.jar Apache Log for Java Plugin: MimeUtil O O O If using Mime-Util Plugin
mail.jar Java Mail API implementation Plugin: SendEmail   O O If using Send-Email Plugin
mime-util-2.1.2.jar Detect the mime type of a file Plugin: MimeUtil O O O If using Mime-Util Plugin
mysql-connector-java-5.1.9-bin.jar MySQL JDBC Drivers Service: JDBC w/MySQL O O O If using JDBC Service with MySQL
openptk-openspml2-toolkit.jar Custom OpenPTK build of OpenSPML toolkit Service: SPML2 w/Oracle IDM O O O If using SPML or SPML2 Service
openspml.jar OpenSPML toolkit Service: SPML w/Sun IDM O O O If using SPML Service
openspml2-toolkit.jar OpenSPML (v2) toolkit Service: SPML2 O O O If using SPML2 Service
slf4j-api-1.5.8.jar The Simple Logging Facade for Java, interface and API Plugin: MimeUtil O O O If using Mime-Util Plugin
slf4j-log4j12-1.5.8.jar The Simple Logging Facade for Java, log4j implementation Plugin: MimeUtil O O O If using Mime-Util Plugin