Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Designing a Service Oriented Architecture seems very obvious for most of us but implies that different parameters are taken into account :

  • Identification of the layers of the application,
  • Definition of the services,
  • Granularity (what are the boundaries of a service, ...),
  • Dependency with libraries,
  • Testing and debugging strategies,
  • Deployment procedure,
  • Infrastructure

Some of the points mentioned are particular to SOA world like granularity and definition of service boundaries but others are mostly found in all IT projects. This is really important to keep them in your head because they will impact the project life cycle, quality of the deliverable, efficiency of the team and project duration/cost.

In this second part of the tutorial we will investigate some of the points mentioned and applied them to a real application. The application will be designed around different components (= bundles in the OSGI jargon) and deployed into Apache Felix Karaf (now part of Apache ServiceMix 4).

Apache Felix Karaf is a small OSGi based runtime which provides a lightweight container onto which various components and applications can be deployed.

...

Prerequisites

This tutorial uses:

Note: The sample project can be downloaded, see the resources section.

...

For the OSGI bundles, different approaches are available depending on the tools that you prefer to use :

But for the purpose of this tutorial, we have used the PAX maven plugin. Why this choice, simply because PAX maven plugin offers a lot of advantages regarding to the one of Spring :

  • pom.xml file generated is very simple to use and to understand,
  • project can be designed with several modules,
  • project can be tested with PAX Exam and launched using PAX runner
  • generate all the folders required including also the META-INF,
  • manifest file is generated automatically,
  • can be imported easily in Eclipse

To create the tutorial projects, you can follow the procedure described here

...

Repeat this procedure for the projects :

  • reportincident.activemq
  • reportincident.camelqueueservice
  • reportincident.persistence
  • reportincident.routing
  • reportincident.service
  • reportincident.web
  • reportincident.webservice

otherwise import the content of the unzipped file in your workspace. You will gain time.

...

It is time now to begin serious things. One of the most important part of a project (if not the most important) concerns the design of the model.
The reportincident model is really simple because it only contains one class that we will use :

  • to map information with the database, CSV file,
  • to transport information to web screens.

Here is the definition of the incident class that you can create in the reportincident.model project directory src/main/java/org/apache/camel/example/reportincident/model or use the code imported

...

It is time now to have a break, to make some sport exercices, to drink a cup of good 'Java' coffee or to go outside of the building to take a walk with your favorite pets.

#Resources

  • Attachments
    patterns.*part2.zip