Wednesday, July 16, 2014

Using Spring framework with Fabric8

So you wanna deploy Spring application into OSGi?

In the older versions of the Karaf, ServiceMix and Fuse we recommended to use Spring Dynamic Modules to deploy applications based on the Spring framework. As Spring DM project is not actively maintained anymore, we currently don't recommend to use it. Moreover due to the fact that there is no other alternative for Spring deployments in the OSGi environment, we don't recommend provisioning Spring-based applications into the OSGi anymore.

Spring Boot container

The recommended approach for working with the Spring applications in the Fabric8 environment is to use the Spring Boot container - the flat classpath microservice provisioned and managed by the Fabric8.

You can provision Spring Boot container either as a managed JVM process or as a Docker container.

Spring Boot container comes with many useful utilities that makes it much easier to use Apache Camel and ActiveMQ. Spring Boot containers can be also aware of the Gateway, ZooKeeper registry and the other Fabric8 components.

Other flat classpath containers

The other option to work with the Spring-based applications in the Fabric8 environment is to deploy those as a part of the WAR into Tomcat or as a module into the WildFly or Apache TomEE. You can also provision managed JVM process and start Spring application context yourself. Keep in mind that those deployment options don't make you to use Spring Boot - you can always create and manage the Spring application context yourself.

Wednesday, July 9, 2014

Wearing my red fedora - GeeCon and 33rd Degree

I usually don't write posts summarizing conferences, because I assume that nobody cares what I think about given event. ;) This time however I decided to write a summary of the most important topics from these two biggest Java gigs in Poland from the perspective of the Red Hatter. I know at least few folks interested in this kind of review ;) .

First of all both 33rd Degree and GeeCon are very similar. Really. Both events take place in the same venue (which is really cool BTW - I love conferences in the cinemas). I even got problem recognizing during which conference I've been talking to whom. However it doesn't really matter as I enjoyed GeeCon as much as 33rd Degree :) .

The most interesting stuff from the perspective of the guy working on daily basis with the Fuse middleware:


Buzz-busters will eat me alive for this, but I must say it. Microservices are becoming really popular. You may argue that microservcies are new ESB, say platitudes like "there ain't no such thing as a free lunch" or just hate microservices with passion. You can't deny however that microservices are starting to become the big thing in the industry right now. I'm particularly interested in this topic as my recent open source love, Fabric8, is a kind of devOps swiss knife where we support microservices as a first-class citizen.

BTW If you got a chance to listen to Thoughtworks' Sam Newman talking about microservices, do it. Believe me, his talk is worth your time :) .

Spring Boot

If you are Spring hater, please stop reading now. Spring holds really big piece of the market share for application frameworks in the Java world. IMHO you need to be a friend to the Spring to get wider adoption of your Java software. Just as we are in Fabric8. Some things to remember in the context of the Spring:
  • Spring XML is dead
  • long live @Configuration
  • long live Groovy
  • IMHO Spring will be basically equal to Spring Boot pretty soon. Don't bother with your lousy custom configuration wiring code - migrate to Spring Boot and make your life easier.
Keep also in mind that not only Thoughtworks and Red Red promotes microservices approach to the architecture. Pivotal is shouting "microservices are cool" at you as well.

Java 8

Sometimes I also can't believe this, but yeah, Java 8 is here and it rocks. Please make our world a better place and adopt it. BTW Apparently Java 7 can be perceived as a minimal version of Java right now. That's good, because we require Java 7 in the latest Fabric8 as well :) .


We love Docker at Red Hat. Fabric8 loves Docker as well. I think that the majority of the industry still doesn't realize how big thing Docker is. Docker should be at your list of the technologies you need to learn in 2014. Docker plays nicely with the microservices approach. And as in the case of the micoservices, many big players started to adopt it (Red Hat, Google, Pivotal, Thoughtworks to name a few).


This is my personal TODO. Vert.x looks really promising and I'm ashamed I don't know it yet. This is project definitely worth to mention in this post as it is supported and promoted by Red Hat. Vert.x is pretty good candidate to take a piece of market share from Spring. And not only Spring, because Vert.x is a polyglot framework and therefore not limited to JVM.