Skip to main content

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 see the "Fuse Tooling Remote Archetype Catalog" under Catalog option, select it.

Select the cdi-mq archetype and for current OpenShift 3.1 make sure it matches the archetype version 2.2.0.redhat-079,

Create the application with 
  • Group ID: com.redhat
  • Artifact ID: mqservicedemo

The project should be created.  The reason we are creating with this archetype is because I want to show you a brilliant idea from Fabric8 that will be very useful. In Fabric8, by using the CDI extension, we can inject service we created in OpenShift to the client by simply specifying the @ServiceName and @Factory in our application. It will automatically locate where the service's clustered Host and Port in our OpenShift environment, since if we are moving to cloud, the server instance will change frequently, so it will be unrealistic to point to real physical location.

Let's start by creating a messaging service named Broker in our Fuse Integration Service, login to OpenShift, which is the base platform of Fuse Integration Service, create a project called demo if you have not already done so.

Add AMQ broker to demo project, we will use the most basic image, choose amq62-basic.

And you will be redirect to a configuration page,  set your application name to broker, and set your prefer ID and PWD, click on "Create" button to start create the service.

It'll take a few minute to startup. And you should be able to see the service up and running in the console.

Go back to JBDS, our quickstart application should be created, navigate the project, go to pom.xml, under plugin docker-maven-plugin add the following environment variable. The reason it can pick up this environment variable is because we have injected the configuration through the ActiveMQConfigurer with Object ActiveMQConfig to set the configurations.

In the routing code, you should be able to see Fabric8 API, and it is injecting ActiveMQ component with broker name, and setting the alias for the endpoint, change the service name to broker-amq-tcp

    ActiveMQComponent activeMQComponent;

We are now ready to deploy our application, we are going to build with S2i method, I talk more about in the upcoming post, for now, just think of it as a way to package our code to a docker image. There are few things we need to make sure it's properly setup before we start deploying, first is the docker settings, to get all the info, go to where your install your vagrant for OpenShift and run

  • vagrant adbinfo 

There you will get all the environment details to set, save it for now,

And alway remember to restart your application after running the adbinfo with

  • vagrant provision 

In command line mode, go to your application directory, can start setting the docker environment variables. And then login to OpenShift with your OpenShift client tool, if you don't have it, you can down load it here.

  • oc login

You will be prompt to enter your login ID and pwd, please login, then we can start deploying with command

Once you have successfully deploy the application, please go back to the OpenShift console, you should be able to see your mqservicedemo pod running, check the log, and you should see something similar to this:

That's all for this time! Thanks! Here is the detail video of how to do it. Thanks!


Jon Disen said…
A really nice introduction series to Fuse Integration Services!
Unfortunately stops the installation of OpenShift because the VirtualBox images are not available at the specified address, i.e ''.
Do you know where they are located?
Yiannis said…
Hi Christina,

I have the same problem is a public server ?

Tnx !
hi ,
i have problem in creating maven project with this archtype:
Could not resolve archetype io.fabric8.archetypes:cdi-camel-archetype:2.2.0.redhat-079 from any of the configured repositories.
plz help me
mvn -Pf8-local-deploy
Failed to execute goal org.jolokia:docker-maven-plugin:0.13.6:build (default-cli) on project mqservice: Cannot create docker access object: /root/testopen/.vagrant/machines/default/virtualbox/.docker/key.pem (No such file or directory) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jolokia:docker-maven-plugin:0.13.6:build (default-cli) on project mqservice: Cannot create docker access object
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(
at org.apache.maven.DefaultMaven.doExecute(
at org.apache.maven.DefaultMaven.doExecute(
at org.apache.maven.DefaultMaven.execute(
at org.apache.maven.cli.MavenCli.execute(
at org.apache.maven.cli.MavenCli.doMain(
at org.apache.maven.cli.MavenCli.main(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(
at org.codehaus.plexus.classworlds.launcher.Launcher.main(
Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot create docker access object
at org.jolokia.docker.maven.AbstractDockerMojo.createDockerAccess(
at org.jolokia.docker.maven.AbstractDockerMojo.execute(
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
... 20 more
Caused by: /root/testopen/.vagrant/machines/default/virtualbox/.docker/key.pem (No such file or directory)
at Method)
at org.jolokia.docker.maven.access.KeyStoreUtil.loadPEM(
at org.jolokia.docker.maven.access.KeyStoreUtil.loadPrivateKey(
at org.jolokia.docker.maven.access.KeyStoreUtil.createDockerKeyStore(
at org.jolokia.docker.maven.access.hc.http.HttpClientBuilder.getSslFactoryRegistry(
at org.jolokia.docker.maven.access.hc.http.HttpClientBuilder.getConnectionFactory(
at org.jolokia.docker.maven.access.hc.DockerAccessWithHcClient.(
at org.jolokia.docker.maven.AbstractDockerMojo.createDockerAccess(
... 23 more
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]
how can I fix it ?
Philips Huges said…
Its a wonderful post and very helpful, thanks for all this information. You are including better information regarding this topic in an effective way.Thank you so much

Installment loans
Payday loans
Title loans
Cash Advances

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 。

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 …

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 …