Some reader favorites:
EJB fundamentals and session beans
Create a scrollable virtual desktop in Swing
Wizard API updated!
Tim Boudreau has released a new version of the Swing Wizard library (version 0.997) that fixes the WizardException bug reported in JavaWorld's recent Open Source Java Project profile. The article's examples have been reworked to test out the new, improved WizardException. Thanks, Tim, for this helpful fix!
Open Source Java Projects: The Wizard API
If you've had your ear to the ground recently, you've likely been hearing a lot about service-oriented application development with OSGi and Spring Dynamic Modules. In this second article in the Hello, OSGi series, find out why Spring DM is such an exciting option for developers already familiar with Spring configuration, who want to exploit OSGi's modularity, easy versioning, and application lifecycle support.
OSGi, also known as the Dynamic Module System for Java, specifies a modular approach to Java application development, as well as a set of standardized methods for managing dependencies between modules. The Spring Dynamic Modules for OSGi Service Platforms project (Spring DM) allows you to build Spring applications that can be deployed in an OSGi container. For Java enterprise developers familiar with the Spring programming and configuration model, Spring DM is an easier way to become familiar with OSGi's modular approach to application development. In addition to enabling Spring developers to access OSGi's modular framework and dynamic configuration, Spring DM provides the low-level coding required by most OSGi applications, so that you can focus on your application's business logic.
The first article in this series ("Hello, OSGi, Part 1: Bundles for beginners") introduced a standard approach to OSGi development using the OSGi API and the open source Equinox container implementation. You learned about the OSGi architecture, especially containers and bundles, and had your first experience developing an OSGi-based Hello World application. The application example did not run very deep because the goal was simply to grasp the fundamentals of OSGi.
In this article, you'll build another Hello World application, this time using the Spring DM framework. You'll learn what Spring DM is and how it leverages OSGi's separation of application logic into modules, as well as its runtime enforcement of module boundaries. You'll also learn how to use Spring DM to do the following:
DataSource class to instantiate, configure, assemble, and decorate components within and across system modules.
As you'll see, using Spring DM will free you of some of the rote work, and even the harder work of understanding what is happening beneath the hood with OSGi. As a result, you'll be able to get deeper into your application logic, and do it sooner in the development process.
To follow the examples in this article you will need a development environment consisting of Eclipse 3.3 and Spring Dynamic Modules. For the final exercise you will also need an RDBMS such as Apache Derby. You'll find more below about setting up your Spring DM development environment in Eclipse 3.3.
Currently, OSGi's popularity is very much on the rise. Several application servers have been repackaged to leverage OSGi's modular framework, including IBM's WebSphere Application Server, BEA's microService Architecture (mSA), and JOnAS 5, an open source application server built from the ground up on an OSGi architecture. JBoss has also recently announced its work on an OSGi-based classloader and its intention to create an OSGi core specification implementation. Perhaps most importantly, the Eclipse Foundation's OSGi container/runtime component engine, Equinox, has recently been elevated to top-level project status, where it will serve as the basis for the new Eclipse Runtime Initiative.
Even before OSGi achieved its current surge in popularity, there was talk of combining it with Spring. Eventually, this talk
led to the Spring Dynamic Modules for OSGi Service Platforms project. The functionality of Spring DM can be divided into two main components: First, it provides Spring framework JARs
in the form of OSGi bundles. As you know from the previous article in this series, OSGi bundles are nothing but Java Archive (JAR) files that contain additional entries in a META-INF/MANIFEST.MF file, which acts as the deployment descriptor for an OSGi bundle. (Note that you cannot deploy a JAR file directly when using
OSGi; you need to package it using the OSGi bundle format.)
Second, Spring DM provides three OSGi-specific Spring bundles/JARs:
org.springframeork.osgi.bundle.extenderorg.springframeork.osgi.bundle.coreorg.springframeork.osgi.bundle.ioApplications built using Spring DM are built differently from those that use the Spring framework. When you build a Spring application, you define your configuration information in one or more Spring configuration files, which are mostly XML files. The Spring framework uses these config files to create an application-context object at application startup. After the application context is created it is used to instantiate, configure, assemble, and decorate objects within the application.
| Subject | Replies |
Last post
|
|
By Ravi Munusamy |
0 |
05/02/08 12:12 PM
by Anonymous |
|
By Mike Francis |
0 |
04/22/08 07:14 AM
by Anonymous |
|
By |
1 |
04/22/08 06:03 AM
by Anonymous |
|
By |
1 |
04/22/08 06:02 AM
by Anonymous |
Technology downloads
More
Free Download - 5 Minute Product Review. When slow equals Off: Manage the complexity of Web applications - Symphoniq
![]()
Free Download - 5 Minute Product Review. Realize the benefits of real user monitoring in less than an hour. - Symphoniq