HowtoBuildDataService: Difference between revisions

From Cheaha
Jump to navigation Jump to search
(Initial stub for HowTo)
 
mNo edit summary
 
Line 1: Line 1:
== 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.  
* 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.  


Line 13: Line 17:
</pre>
</pre>


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


** 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.  
* 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.  
<pre>
<pre>
MODEL_FILE=hq-cohort.caAdapter.xmi
MODEL_FILE=hq-cohort.caAdapter.xmi
Line 27: Line 31:
</pre>
</pre>


** 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.  
* 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.  


<pre>
<pre>

Latest revision as of 16:18, 11 October 2010

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.