Welcome

Welcome to our blog about all kind of topics that are related to software development. We blog about:

SOA, BPM, EDA, ECM and all the other buzz words. Beware some post might not be so common as you think. We are not scared to go against main stream thoughts.

Technologies like java, maven, springframework, OSGi and front end technologies and frameworks like jQuery, DWR, Flex.

Finally to make this happen we need tools and of course a Mac (well some of us do). So we blog about that as well.

Technorati

Add to Technorati Favorites

Linked in

We now have a linked in group, join the group if you are a regular reader and want to see who else reads this blog.

Building Spring DM server compliant OSGi bundles with Maven

s2-logo

Recently, SpringSource released the first version of their DM server. The SpringSource DM Server provides the ability to build enterprise web applications. In the basis, S2DM is a fine mixture of Equinox and Tomcat.

Building OSGi-based web applications was already possible, but it is tedious and error prone work. The typical hello-world example was easy to get going, but as soon as Hibernate or any other framework that helps in larger applications show up, so do your good old class loading problems. For classes to be visible in OSGi, a bundle must declare an Import-Package entry in the Manifest file. Chances are small that Hibernate (even if it were packaged as an OSGi bundle) has these entries for your persistent classes. This is where S2DM server comes in. It allows the more-than-hello-world web applications to be deployed in an environment where you can benefit from the best of OSGi, without the class loading misery. To do this, they have included some extra Manifest entries that are translated to OSGi-compliant directives at load time.

Comparable to the WAR, or better, EAR file, S2DM server supports the PAR file. A PAR file is much like a Jar, with some special headers in the Manifest file, containing all your bundle jars. Some of these jars may contain web bundles, while other typically contain domain classes or the service layer implementation. Contrary to EAR files, a PAR should only contain your own code. It is best practice to deploy frameworks and third party libraries separately. I’ll explain why later on.

With enterprise applications come enterprise development processes, using continuous integration, build servers and maven. In this post, I’ll lay out what you need to get maven to build S2DM server compliant bundles, and better, PAR files.

Continue reading Building Spring DM server compliant OSGi bundles with Maven

Service orientation within applications

Many IT projects at large companies aim to make the company “SOA-proof”. What really concerns me is that time after time software architects tend to treat “XML Web Services” as a synonym for “Service”. In this article, I want to show that SOA may also exist within a single application.

Continue reading Service orientation within applications

Creating a jetty based OSGi HttpService for apache felix

logo.pngOSGi has a service spec called http.service (see Service Compendium document of the OSGi Alliance). Felix has an implementation for it that is based around jetty 4.x. Since we are at jetty 6.1.7 at the moment I thought about trying to create an implementation of my own. Not that it is really necessary, you can expose resources without complying to the spec (see my other post).

But the spec is there for a reason, so let’s try to adhere to it first. The specification is up to the following two interfaces and one exception.

  • HttpContext – Enables bundles to use provided information about a servlet or resource during registration.
  • HttpService – Enables other bundles to dynamically register sevlets or resources into the Http Service URI namespace.
  • NamespaceException – Thrown when a problem arises during registration of a servlet or resource into the Http Service UIR namespace.

At first I tried to create my own implementation for these interfaces. It did not look to hard, but in the end I found the following patch which made my life a lot easier.
jetty6 patch

jetty_logo.gifTo be able to understand the implementation of an Http Service using jetty, you should understand the basics with respect to Jetty. In a forthcoming post I’ll talk more about these details. Within this post I’ll concentrate on the using of the service. I do need to make a few remarks. What if you do not want to apply the patch, change the pom, etc. Well you can download the one I have created from here : org.apache.felix.http.jetty-0.9.0-GRIDSHORE.jar. Another thing I would like to stress is the current state of the bundle. There are a lot of TODO’d in there. It looks like security is not implemented as it should. There is a completely different implementation at the ops4j website. One disadvantage is the level of control, need to look into that thing again. It is much more complicated, uses other bundles of the pax project. It does look interesting, but for me it is not easy enough. Another implementation is available at the sling website. But again a lot to graps before you can start. So for now I have chosen to continue with the slightly limited implementation, adhere to the spec and my bundles should work with the others as well.

Read more to learn about the sample using http.service and maven to build the bundle.

Continue reading Creating a jetty based OSGi HttpService for apache felix

Embedding Jetty in OSGi (osgi felix sample step 3)

jQuery(document).ready(function($) { window.setTimeout(‘loadFBShareMe_52()’,5000); }); function loadFBShareMe_52(){ jQuery(document).ready(function($) { $(‘.dd-fbshareme-52′).remove();$(‘.DD_FBSHAREME_AJAX_52′).attr(‘width’,’53′);$(‘.DD_FBSHAREME_AJAX_52′).attr(‘height’,’69′);$(‘.DD_FBSHAREME_AJAX_52′).attr(‘src’,'http://widgets.fbshare.me/files/fbshare.php?url=http://www.gridshore.nl/2008/02/15/embedding-jetty-in-osgi-osgi-felix-sample-step-3/&size=large’); }); }

This is my third post in the osgi basics series. The topic of today is embedding a servlet container within an osgi container. Of course I am continuing to use felix and now I start using jetty from mortbay. Starting from version 6.1.x, jetty [...]

Using maven to create an osgi bundle (osgi felix sample step 2)

jQuery(document).ready(function($) { window.setTimeout(‘loadFBShareMe_42()’,5000); }); function loadFBShareMe_42(){ jQuery(document).ready(function($) { $(‘.dd-fbshareme-42′).remove();$(‘.DD_FBSHAREME_AJAX_42′).attr(‘width’,’53′);$(‘.DD_FBSHAREME_AJAX_42′).attr(‘height’,’69′);$(‘.DD_FBSHAREME_AJAX_42′).attr(‘src’,'http://widgets.fbshare.me/files/fbshare.php?url=http://www.gridshore.nl/2008/02/13/using-maven-to-create-an-osgi-bundle-osgi-felix-sample-step-2/&size=large’); }); }

This is the second step in a series of items about exploring the felix osgi container and some sidesteps to make life easier while developing osgi bundles. You can find the first step here: http://www.gridshore.nl/2008/02/10/starting-with-osgi-using-apache-felix-step-1/

This is so easy, I do not want to [...]

Starting with OSGi using apache felix (step 1)

jQuery(document).ready(function($) { window.setTimeout(‘loadFBShareMe_37()’,5000); }); function loadFBShareMe_37(){ jQuery(document).ready(function($) { $(‘.dd-fbshareme-37′).remove();$(‘.DD_FBSHAREME_AJAX_37′).attr(‘width’,’53′);$(‘.DD_FBSHAREME_AJAX_37′).attr(‘height’,’69′);$(‘.DD_FBSHAREME_AJAX_37′).attr(‘src’,'http://widgets.fbshare.me/files/fbshare.php?url=http://www.gridshore.nl/2008/02/10/starting-with-osgi-using-apache-felix-step-1/&size=large’); }); }

I think it was somewhere September 2006 when I first read about OSGi. Immediately I saw opportunities to finally come to my long envisioned Service Component Architecture. On top of that I could fix all these classloader issues as well. So good news. Together [...]