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,
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.
This tutorial uses:
- Maven 2.0.9 to setup the projects,
- Eclipse Ganymede 3.4.x,
- Maven eclipse plugin,
- Apache Felix Karaf 1.4.0,
- Dependencies (= jars) used by the tutorial will be downloaded (if not available locally) by Maven
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 :
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.
- Part 2 : real example, architecture, project setup, database creation
- Part 2a : transform projects in bundles
- Part 2b : add infrastructure and routing
- Part 2c : web and deployment
Attachments patterns .*part2.zip