Setup eADC in OpenNCP

eADC Specification

How to setup eADC in OpenNCP

In order to correctly setup eADC in your NCP instance you need to accomplish a set of steps described bellow:

1. Copy eADC resources to your EPSOS PROPS PATH

In order to properly function, you need to copy a set of resources needed by EADC, you must place the folder name EADC_resources at you EPSOS_PROPS_PATH location (Note: this folder is already provided inside epsos-configuration folder).

This folder contains the following directory structure and elements:

Folder NameDescriptionContentNeeded in EPSOS_PROPS_PATH
configContains files related to the EADC configuration, namely the information extraction rules, specific for each country.config.xmlYES
dbContains several database related items, specially the database creation scripts and a sample of database configuration file.

CREATE_EADC.sql

DROP_EADC.sql

NO
demoContains a sample of a Transaction XML, not needed for configuration purposes.TransactionDemo.xmlNO
docContains some html documentation about the eADC component, inherited from previous versions.

index.html

Images folder

NO
schemaContains multiple xml schemas required by the eADC component.Multiple *.XSD filesYES
xsltContains XLST files required for the transformation processes that occur inside eADC.factory.xsltYES

After copying the required folder to the EPSOS_PROPS_PATH you may delete the folders labeled as "Not Required" in the previous table.

You will end with a folder structure like this one:

EPSOS_PROPS_PATH
|--	EADC_resources
|	|-- config
|	|	+-- config.xml
|	|-- schema
|	|	|-- *.xsd
|	|	+-- *.xsd
|	+-- xslt
|		+-- factory.xslt
+-- ...

You may find this folder to download at the attachments section available at the end of this page.

2. Create the database to hold eADC information

You must create a database to hold the information extracted by the eADC. In order to do that you should use the provided SQL script, called "CREATE_EADC.sql", available at the EADC_resources folder (present in the Downloads section of this page).

3. Setup database connections

The database configuration of eADC is done to the application container configuration where eADC will be run. eADC expects following JNDI resources (type of Datasources) to be found: jdbc/EADC_XCPD, jdbc/EADC_XDR and jdbc/EADC_XCA. Below is an example configuration (TOMCAT_HOME/conf/context.xml) for Apache Tomcat 6 server.

context.xml
<?xml version='1.0' encoding='utf-8'?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<Context>
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
	<Resource name="jdbc/TSAM" auth="Container" type="javax.sql.DataSource"
		   maxActive="2" maxIdle="2" maxWait="-1"
		   username="username" password="passw0rd" driverClassName="com.mysql.jdbc.Driver"
		   url="jdbc:mysql://databasehost:3306/<database_name>?zeroDateTimeBehavior=convertToNull"
		   validationQuery="Select 1" />
	<Resource name="jdbc/EADC_XCPD" auth="Container" type="javax.sql.DataSource"
		   maxActive="2" maxIdle="2" maxWait="-1"
		   username="username" password="passw0rd" driverClassName="com.mysql.jdbc.Driver"
		   url="jdbc:mysql://databasehost:3306/<database_name>?zeroDateTimeBehavior=convertToNull"
		   validationQuery="Select 1" />
	<Resource name="jdbc/EADC_XDR" auth="Container" type="javax.sql.DataSource"
		   maxActive="2" maxIdle="2" maxWait="-1"
		   username="username" password="passw0rd" driverClassName="com.mysql.jdbc.Driver"
		   url="jdbc:mysql://databasehost:3306/<database_name>?zeroDateTimeBehavior=convertToNull"
		   validationQuery="Select 1" />
	<Resource name="jdbc/EADC_XCA" auth="Container" type="javax.sql.DataSource"
		   maxActive="2" maxIdle="2" maxWait="-1"
		   username="username" password="passw0rd" driverClassName="com.mysql.jdbc.Driver"
		   url="jdbc:mysql://databasehost:3306/<database_name>?zeroDateTimeBehavior=convertToNull"
		   validationQuery="Select 1" />
	<Resource name="jdbc/ConfMgr" auth="Container" type="javax.sql.DataSource"
		   maxActive="2" maxIdle="2" maxWait="-1"
		   username="username" password="passw0rd" driverClassName="com.mysql.jdbc.Driver"
		   url="jdbc:mysql://databasehost:3306/<database_name>?zeroDateTimeBehavior=convertToNull"
		   validationQuery="Select 1" /> 
</Context>

As you noticed, there are 3 entries to each of the profiles, this allows you to have separate databases to each one. But if you prefer, you may have all pointing at the same database. What you should keep is the configuration structure and all the 3 entries.

Correct place for the configuration file:

TOMCAT_HOME
|--	bin
|-- conf
|	+-- context.xml

Downloads

EADC_resources.zip