Index Changes
This is version 45. It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

Getting Started

This page provides details on creating and running the Milestone 2 demo application. Before we get down to business, check the following items to make sure you are ready to rock!
  • Have you watched the Milestone 2 Demo screencast? If not, check it out. You will see the same application you are about to build in action.
  • Do you have NetBeans 6.1? Technically, it's not required to use Fuji, but it will be easier to follow the instructions if you do. If you would like instructions for running in another IDE like Eclipse, or you want to get down on the command-line, send us an email and we will help you out.

Overview

Step-by-Step

Prepare Your Environment

Configure and Build the Application

Start Your Engines!





Environment Setup

NetBeans Configuration

  • Install the NetBeans IFL Plugin . Note the plugin has been updated, so if you already have one installed, you'll want to use this version instead.
    • NOTE:This plugin depends on mavenide plugin(s) version 3.1.5 in NetBeans 6.1 which will be installed automatically as a dependent plugins during this plugin installation. If you want to install the mavenide plugins first before installing this plugin, follow these instructions
  • Install the NetBeans Fuji Server Plugin .
    • NOTE: If a Warning dialogue is displayed indicating a 'Networking problem' when installing the Fuji Server Plugin, try temporarily disconnecting from the network, restarting NetBeans and trying again.
  • Download and extract the Fuji M2 distribution .
    • NOTE: If you are testing/playing with local changes to the codeline, you will want to use your locally built distribution. The distribution can be found in $SRCROOT/packaging/release-packages/felix/target.



Add Fuji Instance to NetBeans

  • Select 'Services' tab in left-frame of NetBeans
  • Right-click 'Fuji Servers' and select 'Add Server'
  • Root Directory and Working Directory should be the name of the directory where you extracted Fuji. note: this path ends in /fuji
  • Click Finish
  • Right-click the server you created and select 'Start'



Create the database and table

  • Select 'Services' tab in left-frame of NetBeans
  • Right-click 'Databases' and select 'New Connection...'
  • Fill out URL, userid, and password. See this pic(info) for details.
    • Database URL: jdbc:derby://localhost:1600/m2demo;create=true
    • User Name: app
    • Password : app
  • Right-click on the URL you just created under 'Databases' and select 'Connect'
  • Right-click on the URL you just created under 'Databases' and select 'Execute Command'
  • Enter the following SQL and run it (right-click in editor):
CREATE TABLE DELIVERY (
    CONTAINER_ID VARCHAR(60),
    SHIPPER_ID VARCHAR(60)
)



Deploy and start MDM service

  • Download the MDM service bundle(info).
  • Right click on your fuji instance in the Services tab and select 'Install Bundle...'
  • In the file chooser, select m2mdm.jar.
  • Under Service Assemblies, right click on the application and select 'Start'




Building the Application

Configure the services

Deploy and Start

  • Right click on your fuji instance in the Services tab and select 'Install Bundle...'
  • In the file chooser, make sure you are in the application directory and select app.jar.
  • Under Service Assemblies, right click on the application and select 'Start'




Running the Application

Trigger the integration flow

  • Copy a payload file into the FTP inbox directory. Using the configuration below, the full path would be /tmp/inbox/req.in.xml.
  • Example content for the payload


Verify Success

  • Assuming you used the sample payload, you should have the following output:
    • A single email message that looks like this
    • A new record in your delivery database. Go to the services tab, right click on the DELIVERY table and select View Data..... You should see something like this.





Other Details


SMTP service configuration

Be sure to adjust these properties to match your environment.
smtp.location=mailto:testm2demo@gmail.com
smtp.smtpserver=smtp.gmail.com
smtp.useSSL=true
#These values are only required for outbound communication
smtp.username=testm2demo@gmail.com
smtp.password=password

FTP service configuration

Be sure to adjust these properties to match your environment.
An FTP server should be setup in URL provided below.
ftp.messageRepository=/tmp
ftp.messageName=in.xml
ftp.pollIntervalMillis=2000
ftp.use=literal
ftp.url=ftp://joe:secret@localhost:21
ftp.dirListStyle=UNIX
ftp.mode=BINARY

Database service configuration

Be sure to adjust these properties to match your environment.
###                      ###
### insert configuration ###
###                      ###
jdbc.operationType=insert
#jndi handle for datasource
jdbc.jndiName=jdbc/__defaultDS
#sql statement, e.g. INSERT INTO TEST (NAME, ID) values (?,?)
jdbc.sql=INSERT INTO DELIVERY (CONTAINER_ID, SHIPPER_ID) VALUES (?,?)
#parameter order, e.g. NAME, ID
jdbc.paramOrder=ContainerId, EUID
#table name
jdbc.TableName=DELIVERY

Inbound Payload

<Manifest>
<Container>
  <ContainerId>Ship001</ContainerId>
  <Shipper>
     <Name>Joe</Name>
     <Id>ABC123</Id>
  </Shipper>
</Container>
<Container>
  <ContainerId>Ship002</ContainerId>
  <Shipper>
     <Name>Steve</Name>
     <Id>XYZ000</Id>
  </Shipper>
</Container>
</Manifest>


Output Email

<Alarm>
 <Container>
  <ContainerId>Ship002</ContainerId>
  <Shipper>
     <Name>Steve</Name>
     <Id>XYZ000</Id>
  </Shipper>
 </Container>
</Alarm>

Database Record

CONTAINER_IDSHIPPER_ID
Ship001{12DJE23JDKCL229011}

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This particular version was published on 23-Oct-08 23:05 PM, -0700 by srini_chikkala