02 - SIF3 Framework Installx

Download Report

Transcript 02 - SIF3 Framework Installx

SIF3 Framework Install - Java
Install & Verify
Instructions and Exercise
Presented by: Joerg Huber
2
Install & Verify




Create a Java Project
Database (Session Management)
File System (Environment Templates)
Configuration Files


Customise
Verify Install


Start Demo Provider
Run Connector Test
Training Course - Sydney: SIF3 Framework Install
September 2014
© Systemic Pty Ltd
3
Install – Create Java Project

Create a Java Project in your IDE of choice.





Should be a web project, or just use the SIF3Training
Project. In this case skip all other steps listed below.
Suggested structure/directories as in the SIF3Training
Project for this training course
Copy the libraries from the “release” directory
of the framework to the lib directory of your
project (i.e. war/WEB-INF/lib).
Copy the content of the “config”, “lib” & “war”
(needed for provider) directory across to your
project.
Create build scripts (ant, maven, others)
Training Course - Sydney: SIF3 Framework Install
September 2014
© Systemic Pty Ltd
4
Install - Database

Choose a DB product of your choice



For training could use SQLite
Create a DB/Schema (i.e. ‘SIF3’)
Run the following DDL scripts in that
schema


DB/DDL/SIF3InfrastructureERM_DDL_<db_product>.sq
l script.
DB/DLL/Initial_Inserts.sql
Required tables for the SIF3 Framework are
installed and configured.
Training Course - Sydney: SIF3 Framework Install
September 2014
© Systemic Pty Ltd
5
Install – Configuration Files

Set JDBC Connection URL & Credentials:


Set environment template root directory:



Set <display-name> and <url-pattern> (optional)
consumer.properties & provider.properties


<config>/environments.properties
Set “env.store.dir” to location where you want to store
environment templates.
web.xml:


<config>/hibernate/sif3infra.hibernate.cfg.xml
Change the “env.baseURI” and/or “env.connector.url”
to point to your localhost:<port>/<displayname>/<url-pattern>.
Others: Will be highlighted during training.
Training Course - Sydney: SIF3 Framework Install
September 2014
© Systemic Pty Ltd
6
Verify Install - Provider

Start-up Provider (web application!).




Deploy to web/application container.
There is a simple demo StudentPersonal provider in the
SIF3Training Project.
Monitor log file (i.e. /log/SIF3Demo.log) for errors. No
errors => Successful start.
Test Provider:



Type the following into your browser location:
http://localhost:<port>/<display-name>/<urlpattern>/requests/StudentPersonals
Should return error message of type “No or invalid Authorization
Token provided”
Provider appears to be fine, i.e. it responded with correct
message!
Training Course - Sydney: SIF3 Framework Install
September 2014
© Systemic Pty Ltd
7
Verify Install - Consumer
This is not testing the Consumer directly but
the connection and session management of a
consumer (we write a consumer later :-)





Run the TestConsumerConnector class in the sif3test source
(sif3.test.env package).
Should show you a lot of output in the log relating to
environment creation
No errors => All good.
Check the SIF3_SESSION table in the database
 Should hold 2 rows with values. Check the
ENVIRONMENT_XML column that holds a full and valid
environment.
You may want to remove the rows again as this is a test only
 Delete from SIF3_SESSION
Training Course - Sydney: SIF3 Framework Install
September 2014
© Systemic Pty Ltd
Question Time…
8
Questions?
Training Course - Sydney: SIF3 Framework Install
September 2014
© Systemic Pty Ltd