Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Current »

Preface

This document is intended to describe how to create a maven overlay project to build your own instance of the Scheduling Assistant configured for your Oracle Calendar instance. Additional caveats apply with the Oracle Calendar integration as it depends on the native library SDK that Oracle Calendar includes.

Prerequisites

You'll need the following before you begin:

  • Knowledge of your Oracle Calendar servers and access to the native libraries
  • Administrative credentials for each Oracle Calendar server node (the sysop user)
  • Java Development Kit (JDK) version 6
  • Apache Maven 3 https://maven.apache.org/
  • Apache Ant 1.8 https://ant.apache.org/
  • Apache Tomcat 6 https://tomcat.apache.org/
  • A database to store Scheduling Assistant specific information (like Schedule Owner preferences and availability schedules, relationships, etc.)

At this time, the Scheduling Assistant supports HSQL and Oracle databases. The SQL used is ANSI and should work with other databases. If you wish to deploy against another database please contact the mailing list at 'sched-assist-user@lists.jasig.org' and we'll help you get running.

The Scheduling Assistant uses the Oracle Calendar sysop administrative credentials to create and manipulate appointments on behalf of the participants. There is no way to use any other account other than sysop, as the Oracle Calendar integration makes use of the oracle.calendar.sdk.Session#connectAsSysop and oracle.calendar.sdk.Session#setIdentity methods (which are restricted to the sysop account).

Get the Scheduling Assistant Oracle Calendar source

Since the Oracle Calendar integration for the Scheduling Assistant depends on a library that will never be available in public Maven repositories (as the native libraries are restricted under software licensing agreements), you must check out the Oracle Calendar specific source tree for the Scheduling Assistant and install in your local Maven repository.

  1. Create a workspace directory on your file system, e.g. /home/username/jasig/
  2. cd /home/username/jasig
  3. svn co https://source.jasig.org/sa/sched-assist-oraclecalendar/tags/sched-assist-oraclecalendar-1.0.2  sched-assist-oraclecalendar
    1. Note: You can replace 'tags/sched-assist-oraclecalendar-1.0.2' in that url with a known release you want to work with, like 'branches/rel-1.0-patches' (not yet available) or 'trunk' (if you need to develop against the very latest).
  4. cd /home/username/jasig/sched-assist-oraclecalendar
  5. cp build-SAMPLE.properties build.properties
  6. Open build.properties in your favorite text editor
  7. Alter the 'oracle.install.home' and 'csdk.jar' to match the locations of your Oracle Calendar install root and the path to the csdk.jar
  8. Alter the 'java_library_path' and 'ld_library_path' to match your environment (comments in the file describe the differences between windows, linux, and solaris)
  9. Execute the following command to install csdk.jar in your local maven repository:

    ant maven-install-oracle-csdk
    
  10. Now that the csdk jar can be found by the maven build process, install the Scheduling Assistant Oracle Calendar project in your local maven repository:

    mvn package install
    

Prepping a Tomcat instance for Scheduling Assistant Oracle Calendar

Using the Oracle Calendar SDK native libraries in Tomcat requires additional Tomcat configuration.

  1. In your tomcat 6 install, execute the following:

    mkdir -p shared/lib
    
  2. This new directory will contain libraries that are loaded by Tomcat's Shared Classloader. Enable the shared classloader by editing:

    $CATALINA_HOME/conf/catalina.properties
    
  3. Set the value of the 'shared.loader' property to:

    shared.loader=${catalina.home}/shared/lib/*.jar
    
  4. Back in the Scheduling Assistant Oracle Calendar source tree, open build.properties and edit the tomcat.home property to match your $CATALINA_HOME.
  5. Execute the following command to copy the correct dependencies into your Tomcat's shared/lib:

    ant deploy-oracle-csdk-and-loader
    

Creating the war overlay project

Now that the Oracle Calendar integration is installed in your local maven repository, you can create a maven overlay project to build a version of the project configured for your environment.

Maven's war plugin allows you to create an "overlay" of another maven war project. In short, this feature allows you to import another project and lay your own changes over the top.
You can find more information about maven war overlays at: https://maven.apache.org/plugins/maven-war-plugin/overlays.html

  1. Download the sample overlay project at https://mywebspace.wisc.edu/npblair/jasig/my-sched-assist-oraclecalendar-war-1.0.2.zip and unzip on your filesystem.
  2. The first file under your my-sched-assist-oraclecalendar-war directory you will need to edit is at the path:

    src/main/resources/contexts/integration/oracle-calendar-beans.xml
    
  3. The only "bean" you need to edit in this file is the 'oracleCalendarNodeMap.' Create a map 'entry' for each Oracle Calendar server node you have in your environment, copying the sample entries.
  4. You need to provide a properties file that contains the hostnames, ports, usernames and passwords to integrate with your environment. Directly under your my-sched-assist-oraclecalendar-war directory, open the file with the path:

    src/main/resources/scheduling-assistant.properties
    
  5. Edit the properties according to the comments. It is critical that you change the values of the ws.username and ws.password properties from the default to avoid being vulnerable to untrusted web service requests. Within this file you will also store the hostname, port, and sysop password for each of your Oracle Calendar server nodes.
  6. Once the properties file matches your environment, save the file.
  7. You should also edit 'src/main/webapp/META-INF/context.xml' to match the JDBC credentials for the database; by default this file contains the credentials for the HSQL database that can be started from the Scheduling Assistant source.
  8. Execute the following command from the root of your my-sched-assist-war directory:

    mvn package
    
  9. This will download the version of the Scheduling Assistant specified in the pom.xml and add your configuration. The result will be a war file named 'my-scheduling-assistant.war' in the target sub-directory.

Copy this war file to the webapps directory of your Tomcat 6 instance.

You can optionally change the name of the war and a few other properties by editing the project's POM:

  • Open the pom.xml in the my-sched-assist-war directory. You can free to change the following properties as you see fit:
    • artifactId
    • groupId
    • name, description
    • scheduling.assistant.version (under the properties section)
    • finalName (under the build section)

Creating an overlay of the portlet

The Scheduling Assistant portlet requires no custom configuration for use with an Oracle Calendar environment. Follow the instructions in the Bedework documentation:

Portlet overlay instructions for Bedework

  • No labels