
 
benefits to the development of enterprise application 
and software product lines, there is no systematic 
method or technique that show how mainstream 
CBTs can take advantage of them.  
In this context, this paper presents an approach 
for automatic derivation of enterprise applications or 
software product lines implemented using the Spring 
and OSGi technologies. We extend the GenArch, a 
model-based product derivation tool previously 
proposed (Cirilo et al., 2007), to incorporate 
functionalities that allow automatically instantiate 
Spring/OSGi enterprise based applications 
developed over the SDM platform. 
The remainder of this paper is organized as 
follows. Section 2 presents the new mainstream 
CBSE technologies Spring and OGSi, and how this 
two technologies work together in the SDM. Section 
3 describes an overview of GenArch, a model-based 
product derivation tool developed by our research 
group. Section 4 describes the extensions proposed 
to the GenArch tool in order to address Spring-OSGi 
model-based applications. And, finally, on the 
section 5 we present our conclusions. 
2 NEW MAINSTREAM CBSE 
TECHNOLOGIES 
In this section we summarize Spring and OSGi 
component technologies, showing, their differences 
and how they are integrated in the context of Spring 
DM. We also point out the advantages and 
disadvantages that the union of these component 
technologies can bring for feature modularization 
and variability management. 
2.1 Spring Framework 
Spring (http://www.springframework.org) is an 
open-source framework created to address the 
complexity of Java enterprise application 
development. Spring enables the development 
through use of components based on POJOs (Plain 
Old Java Objects), where each POJO contains only 
business logic. The Spring framework is responsible 
for addressing the additional features (transaction, 
security, logging, etc), thus incrementing the base 
functionality provided by POJOs and needed to 
build enterprise applications. 
Spring makes it possible to use a simple 
component model to achieve things that were 
previously only possible with complex component 
models like Enterprise Java Beans (Burke and 
Monson, 2006). In this way, server-side application, 
like web information systems, can benefit from 
Spring in terms of simplicity, testability, and loose 
coupling. These benefits is reached by the inversion 
of control principle (Johnson, 2002) (IoC) and 
aspect-oriented container provided by the Spring 
framework. 
Spring framework uses a XML configuration file 
to specify the application components metadata and 
the dependency between then. This file is called 
application context in the Spring terminology, and is 
the primary unit of modularity of one Spring 
application. It contains one or more Bean definitions 
which typically specify the class that implements the 
Bean, the Bean properties and the respective Bean 
dependencies to be injected. Additionally, this 
configuration file also defines which aspects will be 
applied to each Bean of the application. 
2.2 OSGi 
The OSGi specification (http://www.osgi.org) 
defines a framework that facilitates modularizing 
Java applications into smaller and more manageable 
pieces (Bundles). It defines a standardized module 
packaging, life-cycle management and service 
registration. A Bundle is deployed as a “plain” JAR 
file that contains, besides other resources (e.g., 
classes, aspects, pictures), a MANIFEST file which 
have some specific metadata. This information must 
includes a symbolic name for the Bundle and, 
optionally, can have the location of a activator class 
which is called when the Bundle is started or 
stopped, exported package, package and Bundle 
dependencies, and general information about the 
Bundle. Each Bundle represents an application 
module that also can exports one or more services to 
the end-user or other Bundles. The exported services 
are registered in a specific OSGi service registry, 
that expose this services for other Bundles to 
discover and to use. A newly formed OSGi 
Enterprise Expert Group is a initiative to introduce 
OSGi on the server side. This group is looking for 
extend the OSGi specification to support the needs 
of Enterprise Java vendors and developers, such as: 
distributed and extended service model,  enterprise 
life-cycle and configuration management. 
2.3  Integrating Spring and OSGi for 
SPL Architecture Implementation 
In the context of SPL, the use of Spring and OSGi 
implementation model can bring several advances 
for enterprise application and SPL’s architecture 
development process. In one hand, The Spring 
dependence injection and AOP container provides a 
AUTOMATIC DERIVATION OF SPRING-OSGI BASED WEB ENTERPRISE APPLICATIONS
229