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
Start Your Engines!
Environment Setup
NetBeans Configuration
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
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
.
- Note: If you are using the M4 distribution to run this demo, please use this m2mdm jar
.
- 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
- Open app.IFL (under IFL files in the project view) and right-click on the following service definitions:
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_ID | SHIPPER_ID |
| Ship001 | {12DJE23JDKCL229011} |
This page (revision-51) was last changed on
16-Mar-09 13:29 PM, -0700
by Annies Abduljaffar.
This page was created on
01-Oct-08 13:30 PM, -0700 by KeithBabo.
More info...
| Version |
Date |
Author |
Size |
Changes ... |
|
53
|
16-Mar-09 13:36 PM, -0700
|
Annies Abduljaffar |
8188 |
to previous
|
|
52
|
16-Mar-09 13:33 PM, -0700
|
Annies Abduljaffar |
7958 |
to previous
|
to last
|
|
51
|
16-Mar-09 13:29 PM, -0700
|
Annies Abduljaffar |
7681 |
to previous
|
to last
|
|
50
|
16-Mar-09 13:28 PM, -0700
|
Annies Abduljaffar |
7680 |
to previous
|
to last
|
|
49
|
04-Dec-08 11:14 AM, -0800
|
MarkWhite |
7432 |
to previous
|
to last
|
|
48
|
20-Nov-08 21:21 PM, -0800
|
KeithBabo |
7401 |
to previous
|
to last
|
|
47
|
24-Oct-08 11:31 AM, -0700
|
srini_chikkala |
7769 |
to previous
|
to last
|
|
46
|
24-Oct-08 11:29 AM, -0700
|
srini_chikkala |
7771 |
to previous
|
to last
|
|
45
|
23-Oct-08 23:05 PM, -0700
|
srini_chikkala |
8496 |
to previous
|
to last
|
|
44
|
21-Oct-08 15:38 PM, -0700
|
Annies Abduljaffar |
8173 |
to previous
|
to last
|
|
43
|
21-Oct-08 15:37 PM, -0700
|
Annies Abduljaffar |
8264 |
to previous
|
to last
|
|
42
|
21-Oct-08 15:35 PM, -0700
|
Annies Abduljaffar |
8176 |
to previous
|
to last
|
|
41
|
21-Oct-08 15:33 PM, -0700
|
Annies Abduljaffar |
8172 |
to previous
|
to last
|
|
40
|
21-Oct-08 15:31 PM, -0700
|
Annies Abduljaffar |
8171 |
to previous
|
to last
|