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:


Thanks for following this series of getting started. :)


Charlie Wu said…
Christina 你好:

1. 有開放API可供外部呼叫嗎?例如由JAVA啟動flow
2. JBPM有平行會簽功能嗎?
3. 外部Web資料呈現是可以和JBPM流程拆開來的嗎?
4. 啟動流程有哪幾種方式呢?
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
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!
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,
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: 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(
at org.apache.camel.model.DataFormatDefinition.getDataFormat(
at org.apache.camel.model.UnmarshalDefinition.createProcessor(
at org.apache.camel.model.ProcessorDefinition.createProcessor(
at org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(
at org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(
at org.apache.camel.model.ProcessorDefinition.createChildProcessor(
at org.apache.camel.model.SplitDefinition.createProcessor(
at org.apache.camel.model.ProcessorDefinition.createProcessor(
at org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(
at org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(
at org.apache.camel.model.ExpressionNode.createFilterProcessor(
at org.apache.camel.model.WhenDefinition.createProcessor(
at org.apache.camel.model.WhenDefinition.createProcessor(
at org.apache.camel.model.ProcessorDefinition.createProcessor(
at org.apache.camel.model.ChoiceDefinition.createProcessor(
at org.apache.camel.model.ProcessorDefinition.makeProcessor(
at org.apache.camel.model.ProcessorDefinition.addRoutes(
at org.apache.camel.model.RouteDefinition.addRoutes(
... 28 more
Do you have any idea what is missing?

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:

I hope it can help you.

Unknown 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]
Unknown said…
This comment has been removed by the author.
Unknown 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
Unknown said…
Thanks fellow your posts are really very good for me since it make good sense for me. payday loans direct lenders
Unknown said…

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

Popular posts from this blog

JBoss EAP 6 - 效能調校 (一) DataSource 的 Connection Pool

效能沒有什麼Best Practice, 反正能調整的就那些。 通常,一個程式的效能大概有70-80% 都跟程式怎麼寫的其實比較有關係。

最近我最疼愛的小貓Puji 因為膀胱結石開刀的時候過世了,心情很差請原諒我的口氣沒有很好,也沒有心情寫部落格。

Puji R.I.P.



JBoss 的 SubsystemDatasource WebWeb Service EJB Hibernate JMSJCAJVM 調校OS (作業系統)

先來看一下 DataSource Subsystem, DataSource 的部分主要是針對Connection Pool 做調校。

通常,程式都會需要跟資料庫界接,電腦在本機,尤其是在記憶體的運算很快,但是一旦要外部的資源連接,就是會非常的耗資源。所以現在的應用程式伺服器都會有個Pool 放一些先連接好的 資料庫connection,當程式有需要的時候就可以馬上提供,而不用花那些多餘的資源去連接資料庫。

這就是為什麼要針對Connection Pool 去做調校。

以下會討論到的參數,都是跟效能比較有關係,Datasource 還有很多參數,像是檢核connection 是否正確的,我都不會提到。如果你追求的是非常快速的效能,那我建議你一個檢核都不要加。當然,這樣就會為伺服器上面執行的程式帶來風險。這就是你要在效能與正確,安全性上面的取捨了。 (套句我朋友說的話,不可能又要馬兒好,又要馬兒不吃草的..)

最重要的調校參數就是 Connection 的 Pool 數量。(也就是那個Pool 裡面要放幾條的connection.) 這個參數是每一個應用程式都不一樣的。


Connection Pool 最少會存留的connection 數量


Connection Pool 最多可以開啓的 connection 數量


事先將connection pool 裡面建立好min-pool-size 的connection.

我的建議是觀察一下平常程式要用到的量設定為 min-pool-size 。

My 2cents on the future of Integration - With Service Mesh/Istio and Serverless/KNative

It's been a year and half since I blogged about "Agile Integration architecture" (Gosh, time just flies). With the "microservices" and "cloud-native" hype, I was especially curious on how all these new concept and technology affect us on how to architect the integration systems. If you ever pay close attention to all the latest and greatest news from the Kubernetes community, I am sure you will hear a lot about the new "Service Mesh". And rumor has it that this is how integration can/should be done in cloud native world, but, is that so? Anyone who has ever worked on an integration project would tell you, it's a LOT more COMPLEX and can get worst overtime. I did a talk with Christian Posta in Red Hat Tech Exchange coming from a more comprehensive view of how different Red Hat technologies are applied under different patterns when building integration solutions. In fact he also did a great blog about it.

Since then, another topics has be…

Red Hat Fuse - Announcing Fuse 7 Tech preview 3 release.

Red Hat Fuse 7.0 technical preview three is out today! On the pathway to become one of the best cloud-native integration platform, Fuse gives developer freedom to choose how they want to develop the integration solution, where they want to deploy it and capabilities to address new integration personas that do not have development experience.
By supporting the three major runtime, developer is free to work on the runtime of their choice.By supporting standalone and cloud deployment, it simplifies the complexity to distinguish between these environments, allowing application to deploy freely among the environment of your choice. All levels of developers are welcome, you can either dive deep into creating customize complex integration logic, or using the new low code platform to quickly build a simple integration. In this Tech Preview release you get it all.
Fuse StandaloneSpring-boot for microserviceKaraf 4 for OSGi loverJBoss EAP for JavaEE developersFuse on OpenShiftPlugins for easy co…