Skip to main content

Red Hat JBoss Fuse - Getting Started, Home Loan Demo Part 5

This is the last one of my getting started demo for JBoss FUSE 6.1. For people that are getting started to know Fuse, and wants to get their hands dirty and develop a JBoss Fuse project.

This series of videos are focused on playing with the integration framework in JBoss Fuse, which base on the open source project Apache Camel. In this video I am going deploy the integration projects onto the OSGi container and manage it with Fuse Fabric.

The story behind the home loan demo is we have a system, that takes in XML files from different vendor's home loan application into a folder, and we will need to process the data give house an appraised value and then provide the information back to the vendors. 

First demo was to take in and process the information, and put it into a message broker,  and the second demo,  was about processing the customer data, by reading the xml file and store it into a Postgres Database. The third demo, was slightly complex, by adding value to the house by the number of surrounding schools to the house. we referenced Google App Engine (Google Geocoding API to get the co-ordinate from Address, then use Google Places API to get number of surrounding schools) and then updated the new appraised value into house table in Postgres Database.

And from last demo, we have expose an restful web service endpoint for Vendors to query the new house value and data via customer's Nation ID. 

In this demo, the project is now ready to be deployed into a Testing environment. By using the fabric8 plugin in JBoss Fuse, we are going to start up JBoss Fuse, and create a broker and container in our Fuse management console. Deploy our project onto the OSGi container in JBoss Fuse 6.1. 



In this demo, you will learn, 

Deploy your Camel Project via Fabric8 plugin 
This plugin makes it easy to create or update a fabric profile from your maven project.
When you deploy your project to a fabric profile with this plugin the following takes place:

  • uploads any artifacts into the fabric's maven repository
  • lazily creates the fabric profile or version you specify
  • adds/updates the maven project artifact into the profile configuration
  • adds any additional parent profile, bundles or features to the profile.

Create a new container in JBoss Fuse
The Fabric in JBoss Fuse makes it really easy to provision, automate, configure, and manage from a central location

There is one thing I forgot to mention in the Video,
For Fabric8 plugin to deploy the profile into your JBoss Fuse, need to edit your ~/.m2/settings.xml file to add the fabric server's user and password so that the maven plugin can login to the fabric..

e.g. add this to the <servers> element:

<server>
  <id>fabric8.upload.repo</id>
  <username>admin</username>
  <password>admin</password>
</server> 



Thanks for following this series of getting started. :)


Comments

Charlie Wu said…
Christina 你好:
因JAVA工作關係也剛初碰JBPM,我有幾個JBPM的問題想要請教您

1. 有開放API可供外部呼叫嗎?例如由JAVA啟動flow
2. JBPM有平行會簽功能嗎?
3. 外部Web資料呈現是可以和JBPM流程拆開來的嗎?
4. 啟動流程有哪幾種方式呢?
Christina Lin said…
1. YES
2. jBPM 是只是流程不是簽合系統,你要怎麼設計你的系統功能都可以。
3. YES
4. Within Console, Restful service, KIE API
Netuh said…
Hi Christina,

Many thanks for all demos (demo 1 until 5)... I finally could understand step by step how to develop an application using Fuse ESB and JBDevStudio...

But I have some doubts...

If two activemq endpoints in two distinct containers have the same uri (for instance, activemq:customers) when some put a message there... will both receive? Or just the one inside the container?

Considering two activemq endpoints in the same container and with same Uri... when some put a message there, both endpoints will receive the message or just the first to "listen".

PS: Sorry in asking in english... and if my questions dont make sense
Christina Lin said…
Hi Netuh,

So it depends on where your activemq brokerURL has pointed to. If you start up a queue in a as single standalone broker, then the serve separately, and should all have different IP or Port. So in your brokerURL you point to the one you want to connect. On the other hand, if you use vm in your brokerURL then you will be using the local broker. :) Hope this helps!
Christina Lin said…
Hi Netuh,

So it depends on where your activemq brokerURL has pointed to. If you start up a queue in a as single standalone broker, then the serve separately, and should all have different IP or Port. So in your brokerURL you point to the one you want to connect. On the other hand, if you use vm in your brokerURL then you will be using the local broker. :) Hope this helps!
Netuh said…
Hello Christina Lin,

Thank you for the answer. That was what I would like to know. I will make some test in order to learn how to configure the activemq brokerURL. =)

Many thanks,
Neto
Netuh said…
Hello again Christina,

I was making some experiments to understand better the JBoss Technologies.

As I said, I had followed your "Getting Started, Home Loan Demo" (part 1 until 5).

However, instead of putting all the blueprint file in the same folder. I created a Fuse Project for each blueprint.

And configuring the ActiveMQ beans with (as the Demo presents):
name="brokerURL" value="vm://localhost"

The projects run but they dont receive the messages from the others projects (maybe because each project is a different VM)

I saw some examples configuring them with:
name="brokerURL" value="tcp://localhost:61616"

However, I got the following error message:

[read #0 - JmsConsumer[newdata]] ultJmsMessageListenerContainer ERROR Could not refresh JMS Connection for destination 'newdata' - retrying in 5000 ms. Cause: Error while attempting to add new Connection to the pool; nested exception is javax.jms.JMSException: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused

Do you have any idea of how letting a ActiveMQ bean to listen a port in localhost, instead to listen to vm:localhost?
Andrew said…
Hi Christina,

I enjoyed the video you provided. It is very helpful. Unfortunately, I got an error at the first video. Everything is smooth until I added the unmarshal. I got this message.
Caused by: java.lang.IllegalArgumentException: Data format 'jaxb' could not be created. Ensure that the data format is valid and the associated Camel component is present on the classpath
at org.apache.camel.model.DataFormatDefinition.getDataFormat(DataFormatDefinition.java:90)
at org.apache.camel.model.DataFormatDefinition.getDataFormat(DataFormatDefinition.java:80)
at org.apache.camel.model.UnmarshalDefinition.createProcessor(UnmarshalDefinition.java:162)
at org.apache.camel.model.ProcessorDefinition.createProcessor(ProcessorDefinition.java:460)
at org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(ProcessorDefinition.java:429)
at org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(ProcessorDefinition.java:159)
at org.apache.camel.model.ProcessorDefinition.createChildProcessor(ProcessorDefinition.java:178)
at org.apache.camel.model.SplitDefinition.createProcessor(SplitDefinition.java:101)
at org.apache.camel.model.ProcessorDefinition.createProcessor(ProcessorDefinition.java:460)
at org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(ProcessorDefinition.java:429)
at org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(ProcessorDefinition.java:159)
at org.apache.camel.model.ExpressionNode.createFilterProcessor(ExpressionNode.java:109)
at org.apache.camel.model.WhenDefinition.createProcessor(WhenDefinition.java:77)
at org.apache.camel.model.WhenDefinition.createProcessor(WhenDefinition.java:31)
at org.apache.camel.model.ProcessorDefinition.createProcessor(ProcessorDefinition.java:460)
at org.apache.camel.model.ChoiceDefinition.createProcessor(ChoiceDefinition.java:135)
at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:500)
at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:213)
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:909)
... 28 more
Do you have any idea what is missing?

Thanks,
Andrew
Netuh said…
Hello Andrew,

Maybe on that one I can help you. =)

Are you sure that you put all dependences on pom.xml. In particular the "camel-jaxb".

You can get all the source code from: https://github.com/weimeilin79/homeloan-part1

I hope it can help you.

Netuh
juano said…
I have a problem when I run: mvn fabric8:deploy, got the following error:


[ERROR] Failed to execute goal io.fabric8:fabric8-maven-plugin:1.2.0.redhat-075:deploy (default-cli) on project homeloan
: Failed to update metadata org.blogdemo:homeloan:1.0.0-SNAPSHOT/maven-metadata.xml: Could not parse metadata C:\Users\j
gbv141114\.m2\repository\org\blogdemo\homeloan\1.0.0-SNAPSHOT\maven-metadata-fabric8.upload.repo.xml: end tag name /head must be the same as start tag link from line 14 (position: TEXT seen ...guage="javascript" src="/en/Default/securit
y.js"/script\n/head'... @18:8) -> [Help 1]
juano said…
This comment has been removed by the author.
Ashlyine Brooke said…
I got this blog site through my friends and when I searched this really there were informative articles at the place.end of nc payday loans
Herry Pat said…
Thanks fellow your posts are really very good for me since it make good sense for me. payday loans direct lenders
Nikhil Pandey said…

Read your blog its really informative and helpful keep updating with newer post on Home loan

Popular posts from this blog

Red Hat JBoss Fuse - Getting Started with Fuse Integration Service 2.0 Tech preview

I just realized that I did not do a getting started for Fuse Integration Service 2.0 Tech preview before I did the pipeline demo, thanks for those of you who reminded me! :)

To get started with FIS 2.0, for people who has just getting to know the technology, here is how I interpret it. Basically, it's divide into two aspect,

1. Integration development, FIS uses Apache Camel as the core technology that creates, orchestrate, compose microservices into a super lightweight thin integration layer, and become the API provider and service orchestrator through exposing RESTful or messaging service endpoints. And you can choose to either package and run it with Spring-Boot or Karaf.


2. Application Deployment and Management, FIS takes advantages of OpenShift platform, and allows you to separately deploy the micro-integration service among distributed environment, at the same time takes care of the failover, high availability, load balancing and service lookup problem for you.


So, now we know …

Red Hat JBoss Fuse/A-MQ - Fuse and A-MQ Version 6.3 GA is released!

Fuse and A-MQ 6.3 GA has just went out. Maybe, you would think this is just only a minor version release why should I care? Hold your thoughts on that! Because they have done a lot of improvements and also added many new features into this release.

Besides various bug fixes and making sure Fuse Fabric is much more stable. There are two major change in this version update:

New Tooling in JBoss Developer Studio (JBDS) 9.1 GA. Newer Apache Camel version – Camel v2.17. I was really impressed by the work put in to make developing Camel application much simpler. First is the installation of tooling itself. Now it has a all-in-one installer so you don't need to worry about which plugins you need to check. See the videos below to see the new "Getting Started" of Fuse 6.3.



And If you notice from the above video, the presentation of camel route in JBDS has also updated. It fixed some of the miss representation of logic and making it easier to read.

Old Camel Route
New Camel Route
On …

Fuse Integration Service - Setup JBDS and create first quickstart application

Before we go and start creating our first application, I want to show you how to setup your JBoss Developer Studio, create a small application from the quickstart example and then running it on Fuse Integration Service.

I am using JBoss Developer Studio version 9, you can find it here.
After download the

jboss-devstudio-9.0.0.GA-installer-eap.jar
double-click it, and start installing with default values.

After successful installation, we will need install the plugins for Fuse, on JBoss Central view, select software update, select enable early access.


And select JBoss Fuse Development for the plugin,


Click on install, and we are all set to go!

First thing first, we want to create a Fuse project to deploy on the base of Fuse Integration Service, which is OpenShift. If you have not installed it, please go back to my previous post for instructions. So on your JBDS, right click and start creating the project. Select new, maven project, if you have installed the plugin correctly, you should …