From UABgrid Documentation
Revision as of 17:44, 16 June 2010 by Pavgi@uab.edu
- 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.
- 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.