Enterprise grade Java.
You'll read about Conferences, Java User Groups, Java, Integration, Reactive, Microservices and other technologies.

Wednesday, November 26, 2014

Developer Interview (#DI 8) - The Red Hat Devoxx Keynote Demo Team explains it all

12:00 Wednesday, November 26, 2014 Posted by Test No comments:
, , , , ,
The last blog post about Devoxx and what happened there. Promised. But I really wanted to do this very special developer interview with the team behind the Demo. You already know everything about the technical details behind it and now it it time to let those speak, who actually implemented it.

Sit back, relax and get a #Coffee+++! Thanks to the team for taking the time!

Sebastien Blanc (@sebi2706) - Red Hat, Mobile, AeroGear, Unified Push Server
Erik Jan De-Witt (@edewit) - Red Hat, JavaScript, Node.js, AeroGear
John Frizelle (@johnfriz) - Feedhenry by Red Hat, Architect
Arun Gupta (@arungupta) - Director of Developer Advocacy at Red Hat
Ben Pares (@bparees) - Red Hat, OpenShift, Lead for xPaaS

Tuesday, November 25, 2014

JMS with JBoss A-MQ on OpenShift. Lessons learned about remote Clients and Encryption.

13:00 Tuesday, November 25, 2014 Posted by Test No comments:
, , , ,
OpenShift is the "open hybrid cloud application platform by Red Hat". It comes in different flavors and the most interesting part for most of the things you want to do is the public cloud application development and hosting platform "OpenShift Online". You can easily try it out because using OpenShift Online in the cloud is free and it's easy. All it takes is an email address. The free offering allows for up to three basic small gears and host up to three applications from a variety of different languages and frameworks. If you need more, you can upgrade your plan to a paid version. For more details look at the online feature comparison website.

JBoss A-MQ on OpenShift
The Java Message Service is an effective method for cross-system communication, even among non-Java applications. By basing itself on open source technologies and strong standards, RedHat OpenShift allows developers to easily move their JMS applications to the cloud or write new systems that leverage JMS messages with encrypted internet connectivity.
This post will cover the means for using two major applications: WildFly 8 for hosting web applications, and JBoss A-MQ for asynchronous messaging. Both applications can run on gears within the free tier of OpenShift.

Creating an A-MQ Gear
By deploying A-MQ to the OpenShift cloud, your gear will receive several publicly accessible ports. Client systems can then use these remote ports to connect to your A-MQ service. The endpoints require encryption, so no JMS message will ever be sent in plain-text across the internet.
The first step in creating your A-MQ gear is to clone the existing JBoss Fuse A-MQ cartridge. For those interested in cartridge management, you can view full details on this cartridge. (Note: If you are looking for an upstream cartridge with ActiveMQ, take a look at this blog.)
rhc create-app amq http://is.gd/Q5ihum
Upon creating, the gear provides three important pieces of information:
1. The administrative password that you will use to log in to JBoss Fuse, for managing A-MQ.
2. A new public key that clients must have in order to communicate with A-MQ. This
information looks like

3. A list of public ports A-MQ is using for remote connections.

Managing the encryption on OpenShift
The difference between clients and your OpenShift gear is that OpenShift needs the private key. If you need to change the keys, the keystore file is FILENAME. If you change keys, clients must have the public key before they will trust it. If you change the keys, you must restart the gear. If you forgot to copy your certificate during gear creation of you changed the keystore and need to extract is, use the following commands:
keytool -list -keystore ~/jboss-amq/jboss-a-mq-6.1.0.redhat-378/etc/keystore.jks
keytool -exportcert -alias (whatever it says) -keystore -file openshiftamq.cer
Download the openshiftamq.cer file using an SFTP client and configure clients.

Managing the encryption on clients 
1. Copy the text of your key into a file called amqpublic.cer. Copy each line, inclusive of the BEGIN and END lines.
2. Import the public certificate into a trust store that your clients will use.
keytool -importcert -alias openshiftamq -file openshiftamq.cer openshiftamq.jks
3. Put the openshiftamq.jks file as a classpath resource of your application or somewhere memorable. You won’t need the .cer file anymore but can still keep it around.
4. Within client code, configure this trust store to be used with A-MQ connections. If you do not do this step, clients will not trust the server.

private ConnectionFactory connection(String url) {
    ActiveMQSslConnectionFactory connectionFactory = new ActiveMQSslConnectionFactory(url);
    try {
        connectionFactory.setTrustStore("openshiftamq.jks"); //or file if not in classpath root
    } catch (Exception ex) {
        Logger.getLogger(getClass().getName()).log(Level.SEVERE, "Unable to load trust store.", ex);
    connectionFactory.setTrustStorePassword("put your password here");
    return connectionFactory;

Remote communication from clients
One benefit of using the OpenShift Fuse A-MQ gear is that is exposes several external ports. As a result, your A-MQ service is available without requiring the rhc port-forward command. The URL for your A-MQ clients will look like this:
  • Gearname – the name of your gear within the administrative console.
  • YourDomain – Your standard OpenShift domain.
  • PORT – the numeric port number provided when you created the cartridge.
Configure clients using the ConnectionFactory code from above.

Additional ActiveMQ Configurations in your OpenShift Gear
Many configuration options from a standard A-MQ instance are available within your OpenShift instance. The configuration file for this is


with a few caveats. Namely, you can change the protocol of a <transportConnector /> but must not change the IP or port. The ports are controlled by your OpenShift Gear and are the only ones actually allowed from external areas.

Prevent accidental Gear idling
OpenShift is designed as a resource sharing system, and idle resources will essentially be put to sleep until accessed. JMS poses a particular problem on OpenShift in that if it is idle, connections will not function and new clients cannot connect.
To prevent this behavior, automate a script that periodically interacts with the JBoss Fuse web console or always keep at least one client connected to your A-MQ.

Wednesday, November 19, 2014

Infinite Possibilities - Trip Report Devoxx Belgium 2014

13:54 Wednesday, November 19, 2014 Posted by Test No comments:
, ,
Just a short few days back I was at Devoxx Belgium. For those not in the know. Devoxx Belgium is the premier European java conference and is often referred to as the Java One of Europe. It's a developer centric conference. The folks in attendance are generally language geeks, jvm junkies, performance nuts and general java enthusiasts. We, Red Hat, have been sponsoring the event for a few years now and had a premier stand along with a keynote slot at this years event.

Infinite Possibilities with JBoss, xPaaS and OpenShift
This was a very special Devoxx for me, because I had the opportunity to be part of the official Red Hat keynote. The demo which was part of it came together over a couple of weeks with a lot of engagement by many many peers. I already did post a complete technical rundown of what the audience was able to see. The slides used by Mike are published to slideshare in the meantime (embedded below) and we're looking forward to the recording which should go out to parleys.com soon.

(Source: BJUG Flickr Devoxx Album)
Red Hat at Devoxx
We had a very blue booth this year. It was fun to take part in the team who build all around it and it was just incredibly satisfying to see it all come together. James did the artwork and design, I helped with many tiny things and Karen-Jo held all the loose ends together. Ray, Arun, Karin and many many more also took part in shaping every detail around it.

(Source: BJUG Flickr Devoxx Album)
Red Hatters at Devoxx
From Red Hat's side there were a few folks from engineering, the BU, pre-sales, consulting and marketing. There's been plenty of speakers and sessions by Red Hatters. A complete list is available via jboss.org (Speakers/Sessions) and it was an endless resource of great presentations around all the things that move JBoss and middleware in Red Hat.

Friday, November 14, 2014

The 2014 Guide to Enterprise Integration is available

15:00 Friday, November 14, 2014 Posted by Test No comments:
, , ,
DZone made it again. Another one of their famous guides got published yesterday. This time it is all about Enterprise Integration. It contains articles by industry experts and the complete result from a survey of over 500 practitioners and developers which is probably the most interesting part. So, looking at the distribution of the different integration solutions:

"Out of all integration frameworks (EIP), ESBs, and
integration suites, Spring Integration is the most popular (42%) and Apache Camel is a close second (38%). [...]
Overall, 63% of respondents use an integration framework (e.g. Spring Integration, Camel) and 53% use an ESB or Integration Suite (e.g. Mule ESB, Biztalk), while 18% say they use neither. Note that 69% of respondents are from large organizations, where bigger integration scenarios would be more common."
(Source: DZone 2014 Guide to EI)

There is still some way to go to make Apache Camel and the JBoss Fuse offerings even more attractive to users, but we are listening and I would be happy to hear what you need or would like us to do to further foster adoption of the integration bits (either upstream or productized). Reach out to me via email or in comments to this blog post.

Find a brief introduction to Fuse by Sameer Parulkar (@sparulkar) on page 21. And I nearly forgot to mention, that I had the pleasure to contribute an article about "The Future of Developing & Integrating Applications" which can be found on page 22. Here is a short teaser:

"Think about how far software development has come in just the past five years. It’s hard to believe  that there was a time when generations of developers spent months or years setting up infrastructures
and integrating different applications and backends with each other."
(Source: DZone 2014 Guide to EI)

Get your version for free today!

On Java EE and Community - Voxxed Interview

12:21 Friday, November 14, 2014 Posted by Test No comments:
, ,
Devoxx is nearly a wrap. Beside the general awesomeness, Stephan and his team launched a new content website to be the number one stop for all topics related to technologies which are relevant for Devoxx attendees. While I've been at GeeCon, Lucy asked me for an interview which I happily gave. So we get to chat about WildFly development and explains why the Java EE needs you. And about  JBUGs (http://www.jboss.org/usergroups) and the Virtual JBoss User Group.

Thursday, November 13, 2014

Trip Report: Joker Conf 2014

13:00 Thursday, November 13, 2014 Posted by Test No comments:
, ,
I am traveling a lot lately and catching up with the trip reports is not easy. One of my favorite trips lately was my visit in St. Petersburg, Russia for Jokerconf. It is one of the most technical and Java centered conferences I've seen in a while. The session schedule is an endless list of high quality speakers and topics. Given that, I was honored to present about Java EE and JavaScript while the organizers try to cover even more topics and platforms in the Java space.
The biggest challenge was probably the preparation in this case. I had to get a visa and prepare for travel into a country which language isn't exactly near my own or even English. But the organizers did an amazing job and supported their international speakers. A big thank you for that, because without it it probably wouldn't have happened at all.

The Venue
It is held in the Raddisson Park In Hotel which is a very large hotel roughly 4 km away from the airport. It's no surprise that it has a full blown conference venue build into it and there was everything you could wish for. The room sizes ranged from normal to the very large theater like keynote room.

My Sessions
I gave two presentations about the "Best Features of Java EE 7" and "JavaScript in the Enterprise". Both very well attended and I got some questions afterwards. Find the slides for the sessions on my speakerdeck account. I am very much looking forward to attend next years version.

I tried to capture some impressions from the conference in a Google Plus story. There is also a JokerConf album on Google Plus if you want to get even more. It was fun to bring some WildFly, Java EE and JBoss to Russia! Thank you for having me!

Wednesday, November 12, 2014

What is your "x"? The technical details about the Devoxx Keynote Demo

11:00 Wednesday, November 12, 2014 Posted by Test No comments:
, ,
If everything went fine, I just got off the stage and ended the demo part of Mike's (@mpiech) demo. We talked a lot about xPaaS. The different pieces of the puzzle that we integrated and about our newest acquisition FeedHenry. I think, that all this is worth a more detailed blog post about the inner workings of the demo.

RedHat released a new version of OpenShift Enterprise 2.2 on the 10/10/14. This version also adds support for the private integration solutions (iPaaS) Fuse. Beside this, we recently acquired FeedHenry (mPaaS) and it was about time to show how those technologies actually integrate and help customers build solutions for tomorrows applications. I've been using the following overview in my latest talks to outline what a decent integration with all the different PaaS platforms might look like.
Architecting large Enterprise Java Applications (Slideshare)
On a very high level it contains exactly the parts and setup we used for today's demo. Which is the following:

I have to admit that it is far more complicated, than what we came up with in the demo on stage, but let's not complain and get over the different parts in more details.

Mobile App
The mobile part of the demo was build using Cordova this is very well supported by FeedHenry, from their application console you can create builds for iOS and Android, but also easily test it locally. We used the FeedHenry client side javascript library which beside many other things allows us to generate statistics for the application management console, this can be very helpful when you have a production issue and try to diagnose the problem, for instance. Using Cordova together with Node is really nice, no need to switch paradigms and you can rapidly try out new ideas.

FeedHenry Mobile Application Platform
FeedHenry is a cloud-based mobile application platform to design, develop, deploy and mobile applications. The platform provides specific services for security, notification and data synchronization. You can build hybrid apps for mobile devices and it covers the complete development lifecycle. You can think of it as an Xcode IDE in the cloud which has three different components for applications. Obviously the mobile app, a server backend which you can built on top of Node.js and so-called mPaaS services which can be re-used across different applications. The interesting part of the demo are the two services.
One which connects to JBoss A-MQ for xPaaS running on OSE via TCP/STOMP protocol and the other one connecting to an AeroGear unified Push Server instance running on OpenShift Online via REST.
The new AeroGear MBaaS Integration Services leverages the  Node.js module already developed by the AeroGear team and provides a simple, secure way to integrate Push Notifications into your FeedHenry apps. The service itself is quick and painless to set up – simply provide the details of your AeroGear installation and credentials for the AeroGear app you want to use and you are ready to go. Using the service is just as easy – as a standard FeedHenry MBaaS service, you can call it in exactly the same way as you would any other MBaaS service – with a clean, crisp FeedHenry API call.

AeroGear UnifiedPush Server on Openshift Online
The AeroGear project is a one stop solution for all your Push Notification needs – covering Native iOS & Android, Cordova Hybrid as well as Simple Push for Web. It is available to use right now from the OpenShift Marketplace – so feel free to give it a whirl.

JBoss Fuse and A-MQ for xPaaS on OpenShift Enterprise
JBoss Fuse for xPaaS and JBoss A-MQ for xPaaS are based on Red Hat’s traditional on-premise integration and messaging offerings, Red Hat JBoss Fuse and Red Hat JBoss A-MQ. The latest versions of both products, announced at Red Hat Summit 2014, introduced features such as full support for AMQP 1.0, a vast library of connectors, improved high availability, and the ability to manage processes. In this particular example both instances running are managed via the Fuse Fabric. And the deployment of the Camel route to receive the twitter stream of tweets actually was done via a profile on the fabric. Distributing those applications and infrastructures gets insanely easy by doing it like that.
At the end, the Camel rout isn't very magical. Just a few lines of code for a log and a little conversion to JSON to make it easier for the FeedHenry A-MQ endpoint to consume it on the Node.js end. This screenshot was taken before the demo happened, I hope that we have some higher numbers after the keynote.
The A-MQ side is even more simple. A basic standalone broker setup with just one queue called "tweets" like you already might have guessed. We are using two different client connectors. The Camel instance pushes messages via OpenWire and the FeedHenry service listens to them using STOMP. We're actually not sending around binary content here, so this was the easiest setup.
To be clear at this point: The Twitter integration is a nice showcase which we used to have a contact point with the audience. In real life scenarios you're going to connect heavyweight stuff with Fuse. Like SAP, Oracle EBS, you name them.

The beauty of this is the overly complex architecture. We could have taken many shorter ways to make it work, but on the other hand, it was a very good exercise. In less than two weeks the RedHat and FeedHenry teams made both technical integrations possible. And we are very proud to have integrated this first chunk of services and help to better understand for what the different products are meant to be used.

My Thank You's
Even if I had the pleasure to be on stage for the demo, I only did the very simple backend part. There are a bunch of folks, I'd like to mention here:
- John Frizelle and Conor O'Neill for being our 24/7 contact into FeedHenry. There's not a single thing those two couldn't solve.
- Jay Balunas, Erik-Jan De Wit, Sebastien Blanc and Matthias Wessendorf for developing the mobile bit's and pieces and writing the Node.js service that we now have available in FeedHenry
- Ben Parees, Grant Shipley, Marek Jelen, Hiram Chirino for all their efforts aroun OpenShift Online AND the Enterprise deployment that we used for the demo
- Mike and Arun for all their support around the demo and their patience because we didn't have it ready until the very last minute.
- Christian Posta for holding my hand with all kinds of stupid Fuse questions

Further Readings
If you are curious, you can just get started with reading some more about what we did. Please keep in mind, that the acquisition is quite new and we still don't have a publicly available version of FeedHenry ready for you to play with. But this is in the works. Keep your eyes open.