Skip to content

Spring Boot and Apache Camel running on OpenShift hosted platform (PaaS)

Over the past 6 months we have seen an uptick in the number of requests from clients to help understand how they can leverage a “Platform as a Service” (PaaS) — given they currently have existing code/deployment environments.  This Blog backed by a demonstration video (see link below) will at least help folks see working with a PaaS isn’t as much of a stretch as one would think.

Admittedly this Blog is NOT intended to be comprehensive, but rather quick peeks into how you can still take advantage of using a PaaS even if your not leveraging all its capabilities — even just leveraging the provisioning of a Tomcat server as we do in the demonstration video has huge benefits.  Note: In follow on video demonstrations I will extend this video to show how hooking into additional provisioned components like a MongoDB can be quite straight forward.

PaaS Background:

“Platform-as-a-service (PaaS) is one of the three main categories of cloud computing service. PaaS is the middle layer which is basically a platform (could be tools, software, middleware etc) which sits on Infrastructure and are used for coding and deploying the applications are called as PaaS. Hence, PaaS can be defined as a platform for the creation of application or software delivered over the web on demand.”  (http://www.theresearchpedia.com/research-articles/top-10-benefits-of-paas)

Use this link to view the demonstration video:

DEMO: http://youtu.be/G7taEakypnA

SOURCE CODE: https://bitbucket.org/dmarley/boot-camel-openshift-1/src

Java EE 7 Batch Processing (JSR 352) and SpringSource Batch

Java EE 7 includes many exciting new specifications — one of special interest to my team is the introduction of the Batch Processing (JSR 352) specification, as we have been doing lots of
Spring Batch work lately. So I thought I would share how Spring Batch and Java EE 7 Batch processing compare.

Provides:
— non-interactive, long-running, bulk-oriented processing
— computationally intensive processing
— option for sequential or in parallel executions
— run ad-hoc, scheduled or on-demand executions

Link to — Differences

Evaluating lightweight Integration Frameworks vs full ESB’s

I recently found a good article which summarizes/compares the strengths of two key players in Integration Framework development (Open Source).

Apache Camel — need support?  Fusesource,  need consulting services/experts? Middleware360 Solutions

Spring Integration Spring Source offers support!, need consulting services/experts? Middleware360 Solutions

Link to Article —  (Spring Integration vs Apache Camel)

Link

GR8Conf Europe 2013 Slides and Videos

GR8Conf Europe 2013 Slides and Videos

Here’s the Slides and Videos link for GR8Conf Europe 2013

Watched a couple of the video’s and they are quite good — “Building Grails Apps with Gradle” and “Grails under the hood” just to call out a couple!

enjoy.

Running Grails on Tomcat 7 — nasty “SEVERE: Error listenerStart” error

PROBLEM:

Working through an integration project for a client we encountered an issue with Tomcat not being able to start our Grails application which housed our Apache Camel integration routes.

When we started tomcat it would throw a “SEVERE: Error listenerStart” error.

The problem was there was no way of narrowing down the error, as Tomcat wasn’t outputting the root cause of the exception.

ENVIRONMENT:

  • Grails 2.0.4
  • Tomcat 7.0.34
  • Java 1.6.0_43

SOLUTION:

After tomcat explodes out the war file

  • stop tomcat
  • go into the following dir <tomcat dir>/webapps/<appname>/WEB-INF/classes 
  • add a file called logging.properties with the following content below
  • start tomcat
  • should see root cause in logs/<appname>.log

logging.properties (sample)

handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler org.apache.juli.FileHandler.level = FINE

org.apache.juli.FileHandler.prefix = <appname>.

java.util.logging.ConsoleHandler.level = FINE

java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

Link

SpringOne 2GX in Washington 2012 VIDEOS

SpringOne 2GX in Washington 2012 VIDEOS

Attended the SpringOne 2GX conference this year in Washington.  Was a great time/experience — planning to attend in 2013 via Middleware360 Solutions Inc.

Here are the published Videos from 2012.

Java Date Formatting and Thread Safety

Real Time Saver… 

I was recently on a consulting engagement and requested to make modifications to a high volume JMS implementation (over 14 million messages per day).  One of the tasks was to onboard/integrate a legacy system to the enterprise messaging system.  One of the requirements was to attach two additional message headers as follows (in order to support an audit process already in place):

  1. Date in which the Message was published to the system (format “2013-01-20″ [String])
  2. Time in which the Message was published to the system (format “15:57:31″ [String])

The bridge to the messaging system is multi-threaded, so I needed to find a thread safe way of getting both the Date and Time formatted to the outlined requirement.  As most java developers are aware SimpleDateFormatter is NOT THREAD SAFE!  

After some quick looking and trying I ended up with the following:

Image

 

Worked Great!

 

Follow

Get every new post delivered to your Inbox.