HowtoBuildDataService

Assumption / Prerequisites

 * Coming soon!

Steps

 * Following example shows how to build a data service using caCORE-SDK. The input to caCORE-SDK is EA generated XMI file. The caCORE-SDK generates web data service and a data service skeleton(?) which can be later used for building grid data service.

cd $HOME/dasi/dtools/caCORE-SDK411/models/ svn export svn+ssh://projects.uabgrid.uab.edu/srv/svn/projects.uabgrid/dasi/trunk/dataservices/hq-cohort/hq-cohort-caAdapter.xmi
 * Grab domain model file(s) from subversion repository and place them in caCORE-SDK's models directory. Following example shows to get hq-cohort domain models.

cd $HOME/dasi/dtools/caCORE-SDK411 vi conf/deployment.properties
 * Edit deployment.properties file and change following information.

PROJECT_NAME=hqcohort
 * Change project name to your web data service name. The generated war file will have this project name.

MODEL_FILE=hq-cohort.caAdapter.xmi MODEL_FILE_TYPE=EA INCLUDE_PACKAGE=.*?hqcohort.* USE_JNDI_BASED_CONNECTION=false DB_JNDI_URL=java:/SDK
 * Edit model file parameters and replace package name with the appropriate. In this case it is same as project name, but that may not be the case always.


 * We will be using fake MySQL database parameters in this guide. These parameters need to be changed with actual database parameters during deployment. Please keep same fake parameters so that you can use deployment scripts to change them later during deployment.

DB_CONNECTION_URL=jdbc:mysql://localhost:3306/dbname?autoreconnect=true DB_USERNAME=user DB_PASSWORD=pass DB_DRIVER=com.mysql.jdbc.Driver DB_DIALECT=org.hibernate.dialect.MySQLDialect

cd $HOME/dasi/dtools/caCORE-SDK411 ant clean-all ant build-system
 * Create data service

ls -l $HOME/dasi/dtools/caCORE-SDK411/output/hqcohort/package/webapp/
 * On successful build, you should see PROJECT_NAME.war file in following folder:


 * The war file can be deployed in Tomcat container using deployment scripts. The caCORE-SDK-411 directory can now be uploaded to repo and used for building grid data services using Introduce.