Enable OSGi Applications with Java EE 7 technologies
You can enable OSGi Applications with key Java™ Platform, Enterprise Edition (Java EE) 7 technologies. WebSphere® Application Server Liberty Version 8.5.5.6 and later, is a production ready server certified for Java EE 7 Full Platform.
To achieve zero migrations, new features are created and existing features remain unaltered. For
example, when support for servlet 3.1
was added, a servlet-3.1
feature was created, and servlet-3.0
was kept to ensure behavior did not change for
an existing server deployment.
In an environment before Java EE 7 support, you were required to configure
blueprint-1.0
, or something that depends on it, to be able to deploy OSGi
applications. You then either configured other OSGi-specific features, like
wab-1.0
, or generic ones, like jpa-2.0
, to get other
capabilities.
- Decide you want to deploy OSGi Bundles.
- Decide what technologies you want to use to implement those OSGi Bundles.
Telling the server you want to deploy OSGi Bundles
osgiBundle-1.0
feature to your
server.xml:<featureManager>
<feature>osgiBundle-1.0</feature>
</featureManager>
Adding the osgiBundle-1.0
feature enables OSGi
Bundles to be deployed as part of an OSGi application.Telling the server what component models you want to use
wab-1.0
, you now configure the
same component models you would for Java EE. This configuration enables the use of servlets in
Bundles, for example, Web Application Bundles or Http Whiteboard
servlets:<featureManager>
<feature>osgiBundle-1.0</feature>
<feature>servlet-3.1</feature>
</featureManager>
For more information, see OSGi Web Application Bundles and OSGi Http Whiteboard.jpa-2.1
in a Persistence
Bundle:<featureManager>
<feature>osgiBundle-1.0</feature>
<feature>servlet-3.1</feature>
<feature>jpa-2.1</feature>
</featureManager>
For more information, see Accessing data using Java Persistence API .blueprint-1.0
:
<featureManager>
<feature>osgiBundle-1.0</feature>
<feature>servlet-3.1</feature>
<feature>jpa-2.1</feature>
<feature>blueprint-1.0</feature>
</featureManager>
Which Java EE 7 component models are supported?
You can see the full list of Java EE 7 technologies that are enabled for OSGi applications.