HowtoBuildDataService

From Cheaha
Revision as of 16:18, 11 October 2010 by Pavgi@uab.edu (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Attention: Research Computing Documentation has Moved
https://docs.rc.uab.edu/


Please use the new documentation url https://docs.rc.uab.edu/ for all Research Computing documentation needs.


As a result of this move, we have deprecated use of this wiki for documentation. We are providing read-only access to the content to facilitate migration of bookmarks and to serve as an historical record. All content updates should be made at the new documentation site. The original wiki will not receive further updates.

Thank you,

The Research Computing Team

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.
  • 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/models/ 
svn export svn+ssh://projects.uabgrid.uab.edu/srv/svn/projects.uabgrid/dasi/trunk/dataservices/hq-cohort/hq-cohort-caAdapter.xmi  
  • Edit deployment.properties file and change following information.
cd $HOME/dasi/dtools/caCORE-SDK411 
vi conf/deployment.properties 
  • Change project name to your web data service name. The generated war file will have this project name.
PROJECT_NAME=hqcohort
  • 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.
MODEL_FILE=hq-cohort.caAdapter.xmi
MODEL_FILE_TYPE=EA
INCLUDE_PACKAGE=.*?hqcohort.*
USE_JNDI_BASED_CONNECTION=false
DB_JNDI_URL=java:/SDK
  • 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


  • Create data service
cd $HOME/dasi/dtools/caCORE-SDK411 
ant clean-all
ant build-system 
  • On successful build, you should see PROJECT_NAME.war file in following folder:
ls -l $HOME/dasi/dtools/caCORE-SDK411/output/hqcohort/package/webapp/
  • 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.