SlideShare a Scribd company logo
1 of 33
Download to read offline
axe2010LONDON
060ā€¢05GCommunity
Event2010
Enterprise OSGi in WebSphere and
Apache Aries
Ian Robinson, IBM
62605GiCommunity
Bowl1010
129 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Agenda
OSGi and Java Enterprise ā€“ who needs
who?
The Culture Clash
Apache Aries
Whatā€™s Next in Aries and Enterprise OSGi?
Aries and WebSphere Application Sever
62605GiCommunity
Bowl1010
A
jpt.
229 Sep 2010
Ian Robinson (c) IBM Corp, 2010
IDL JDBC JNDI JAXP JAAS JMX RMI-IIOP
Enterprise APIs in Java SE (Required for Java EE)
Servlet JSP
Web Container
JavaM
ail
JAF
JAX-
RPC
JAX-
WS
Web
Service
s
WS
Metada
ta
JMS
JTA
JACC
JAXR
Manag
ement
JPA
EJB
SAA
J
HTTP/
SSL
Direct dependency
Optional dependencies
JSTL
JSF
JAX
B
JCA
Deb
ug
Com
mon
Anno
tation
s
Java EE Web technologies
StAX
Indirect (soft) dependency
JAX-
RS
JASPI
C
CDI&
DI
OSGi and Java Enterprise ā€“ who needs who?
HTTP Session Replication Connection Management Persistence Providers User Registries Event Mgmt
Logging and Tracing MBean Server
Admin Console
and scripting
DataSources Messaging Engines Security
Transport Channels Workload Management
HTTP Serving
and routing
High Availability
Management
Transaction Logging
and Recovery
Thread management Classloading Provisioning Monitoring
Policy and SLA
mgmt Configuration
ā€¦
05G1
kwo
Applications
(bundles) Services
Life Cycle
Module
Java Execution Env
OS + Hardware
329 Sep 2010
Ian Robinson (c) IBM Corp, 2010
OSGi and Java Enterprise ā€“ who needs who?
IDL JDBC JNDI JAXP JAAS JMX RMI-IIOP
Enterprise APIs in Java SE (Required for Java EE)
Servlet JSPWeb Container
Ja
va
M
ail
J
A
F
JA
X-
R
P
C
JA
X-
W
S
W
eb
Se
rvi
ce
s
W
S
M
et
ad
at
a
J
M
S
JT
A
JA
C
C
JA
X
R
M
an
ag
e
m
en
t
JP
A
EJ
B
S
A
A
J
H
T
T
P/
S
SL
Direct dependency
Optional dependencies
JS
TL
JS
F
J
A
X
B
J
C
A
D
e
b
u
g
C
o
m
m
o
n
A
n
n
o
t
a
t
i
o
n
s
Java EE Web technologies
S
t
A
X
Indirect (soft) dependency
JA
X-
R
S
J
A
S
PI
C
C
DI
&
DI
HTTP Session ReplicationConnection ManagementPersistence ProvidersUser Registries Event Mgmt
Logging and TracingMBean Server
Admin Console
and scripting
DataSourcesMessaging Engines Security
Transport ChannelsWorkload Management
HTTP Serving
and routing
High Availability
Management
Transaction Logging
and Recovery
Thread managementClassloading Provisioning Monitoring
Policy and SLA
mgmt Configuration
Java EE App Server
Applications
Enterprise
Services
Metadata and
enterprise service-enablement
Three ways of looking at Enterprise OSGi technologies
1
2
3
12' 05G.Community
Bowl1010
429 Sep 2010
Ian Robinson (c) IBM Corp, 2010
The Culture Clash
Java EE OSGi
An application is a collection of
wars/jar modules scoped by an
EAR
There is no multi-bundle
ā€œapplicationā€ scope other than an
OSGi framework
Applications are isolated from
one another in a server
Bundle exports are visible
throughout the framework
Container-centric. Distinct
contracts for containers and
applications
All bundles are created equal.
Defines complete enterprise
programming model (JTA, JPA,
Web, JMX, Web, EJB, JAX-WSā€¦)
OSGi Enterprise Specification
V4.2 defines services-based
access to Java EE technologies
62605GiCommunity
Bowl1010
529 Sep 2010
Ian Robinson (c) IBM Corp, 2010
OSGi Enterprise Specification
Released 22 March 2010
ā€“ The product of the OSGi Enterprise Expert Group (EEG)
Brings Enterprise technologies and OSGi together
Using existing Java SE/EE specifications:
ā€“ JTA, JPA, JNDI, JMX, WebAppsā€¦
Plus Spring-derived Blueprint component model and DI
container
Java EE provides the core enterprise application
programming model
Deploying modules as OSGi bundles simplifies reuse
between applications, provides versioning, encourages
(and enforces) modular design and enables dynamic
module updates.
62605Gi-
Ezn
Apache
ARIES
629 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Enterprise OSGi in Apache Aries
Apache Aries Project started in Sep 2009
http://incubator.apache.org/aries/
ā€“ Delivering a set of pluggable Java components enabling an enterprise
OSGi application programming model.
ā€“ Implementations and extensions of application-focused
specifications defined by the OSGi Alliance Enterprise Expert Group
(EEG) and an assembly format for multi-bundle applications, for
deployment to a variety of OSGi based runtimes.
ā€“ to build a broad development community to encourage implementation
and adoption of EEG specs
Just delivered 2nd (incubator) release.
ā€“ OSGi Compliance Tests published
for each release.
Aries componentry supporting an enterprise OSGi
programming model has been integrated into both
Geronimo and WebSphere Application Server.
ā€“ As well as Apache Felix Karaf, JBossOSGi and others
Project was 1 year old last week
62605GiCommunity
Bowl1010
729 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Aries projects includeā€¦
JMX
JTA integration
Blueprint container
JPA integration
JNDI integration
Application assembly and deployment
Samples, documentation, integratorā€™s
guide
http://svn.apache.org/repos/asf/incubator/aries/trunk/
O
MBean Serve
O
Ā«MBean>>
Bundle State
MBean
1111111111111111111111111111111111111111111111111
.1111111111111111111111111111111111111111111111111111111111111111111
""""""""."""""""""""""""""""""""".
Ā«MBeanĀ»
Package St ate
MBean
Immimmimmimmimmimmimmimmimmim
'1111111111111111
Ā«M3ean>>
Fram ework
MBean
1111111111111111111111111111111111111111111111111111111111111111111
Ā«M3ean>>
Service St ate
MBean
11111111111111111111111111111111111111111111111111111111111111111111
111AV /ā€”NC
!VIC 1 ICI 661
um
ll
ummummummummummummummum
<4V1BeanĀ»
D.rrn:e
91111111111111111111111111111111111111111111111111111111111111111111
W III 1151. PL./ 11
Ad min MBean
"I11111111111111111111111111111111111111111111111111111111111111111111
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,1111..........
Ā«MBeanĀ»
Provisi onin g
ServiceM Bean
"mmimmimmimmimmimmimmimmimmimm
Ā«MBeanĀ»
User Adm in
MBean
"111111111111111111111111111111111111111111111111111111111111111111111.....
1
jax,.., 829 Sep 2010 6'605GCommunity
Event 1:10
Aries )MX Integration
Implementation of OSGi JMX specification.
o Aries JMX bundle automatically registers the JMX
MBeans into any
javax.management.MBeanServer service in the
OSGi Service Registry.
PermissionAdrnin
Cnnficriratinn Admin
Provisioning Service
User Adrrin
Ian Robinson (c) IBM Corp, 2010
829 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Aries JMX Integration
Implementation of OSGi JMX specification.
Aries JMX bundle automatically registers the JMX
MBeans into any
javax.management.MBeanServer service in the
OSGi Service Registry.
JMX OSGi
Manager
<<MBean>>
Framework
MBean
<<MBean>>
Bundle State
MBean
<<MBean>>
Service St ate
MBean
<<MBean>>
Package St ate
MBean
<<MBean>>
Configuration
Admin MBean
<<MBean>>
Permission
Admin MBean
<<MBean>>
Provisioning
ServiceMBean
<<MBean>>
User Admin
MBean
PermissionAdmin
Configuration Admin
Provisioning Service
User Admin
MBean Server
<<MBean>>
Blue print
MBean
Framework MBeans
Compendium MBeans
Additional Aries MBeans
XA Protocol
7
[TA Provider
Transaction
Synchroni: ation
Registry
((interfaceĀ»
XAResource
an aged
Application Imp!
Application
Container Impl
-source
onager Impl
XAResource Imp!
User Transaction
Transaction Manager
62605GiCommunity
Ewen!2010
.7* a resource specific service
929 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Aries JTA integration
Apache Aries integrates the OSGi Transaction
Service Ref Impl from Apache Geronimo.
This spec is a good
example of the
OSGi/Java EE
culture clash:
ā€“ Different services
for application and
container
62605GiCarrfflnunity
Bowl1010
bond e service bund:e
jax,.. 1029 Sep 2010
Ian Robinson (c) IBM Corp, 2010
OSGi Services ā€“ No Java EE analog
Services registered in Service Registry.
Services are dynamic
Clients (bundle B) need to cope with them going
away
There is no analog for dynamic services in Java EE.
S
12' 05G.Community
Bowl1010
1129 Sep 2010
Ian Robinson (c) IBM Corp, 2010September 8th 2010
Using Services can be hard
private BundleContext ctx;
private AtomicReference<LogService> ls = new AtomicReference<LogService>();
private AtomicReference<ServiceReference> lr = new AtomicReference<ServiceReference>();
public void start(BundleContext ctx) throws InvalidSyntaxException
{
this.ctx = ctx;
ctx.addServiceListener(this, "(objectClass=org.osgi.service.log.LogService)");
ServiceReference ref = ctx.getServiceReference(LogService.class.getName());
if (ref != null) {
ls.set((LogService) ctx.getService(ref));
lr.set(ref);
}
}
@Override
public void serviceChanged(ServiceEvent event)
{
ServiceReference ref = event.getServiceReference();
if (ls.get() == null && event.getType() == ServiceEvent.REGISTERED) {
ls.set((LogService) ctx.getService(ref));
} else if (ls.get() != null && event.getType() == ServiceEvent.UNREGISTERING &&
ref == lr.get()) {
ref = ctx.getServiceReference(LogService.class.getName());
if (ref != null) {
ls.set((LogService) ctx.getService(ref));
lr.set(ref);
}
}
}
62605G1
ā€¢_
Carrfflnunity
Bowl1010
1229 Sep 2010
Ian Robinson (c) IBM Corp, 2010September 8th 2010
Blueprint Simplification
public class Bean {
private LogService log;
void setLog(LogService logService) {
log = logService;
}
void process(Order o) {
log.log(LOG_INFO, ā€œprocessing: ā€œ + o);
}
}
<blueprint>
<bean id=ā€shopā€ class=ā€org.example.ecomm.Beanā€>
<property name=ā€logā€>
<reference interface=ā€org.osgi.service.log.LogServiceā€/>
</property>
</bean>
</blueprint>
62605GiCommunity
Bowl1010
1329 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Aries Blueprint Container
XML Blueprint definition describes component configuration and
scope
ā€“ Optionally publish and consume components to/from OSGi service
registry.
Simplifies unit test outside either Java EE or OSGi r/t.
The Aries BP container
implementation is highly extensible:
ā€“ Namespace handlers supported to
extend the Blueprint definitions
ā€“ Bean interceptors can be
registered by handlers
Other Aries components contribute
handlers ā€“ ā€œjpaā€ and ā€œjtaā€ handlers.
dependencies injected
consumes
servicepublishes
service
A static assembly
and configuration
of components
(POJOs)
Blueprint bundle
OSGI-INF/blueprint/
blueprint.xml
62605GiCommunity
Bowl1010
1429 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Container managed JPA support integrated with
Aries Blueprint container:
ā€“ @PersistenceUnit or @PersistenceContext (managed)
ā€“ or <jpa:unit>, <jpa:context> bean property injection
ā€“ Familiar development experience for JPA developers
ā€“ Load-time enhancement of Entity classes (WebSphere)
Same container managed transaction attributes as
EJBs:
ā€“ Required, RequiresNew, Mandatory, NotSupported,
Supports, Never
<blueprint>
<bean id=ā€shopā€ class=ā€org.example.ecomm.ShopImplā€>
<jpa:context property="em" unitname="myUnit"/>
<tx:transaction method="*" value="Required"/>
</bean>
</blueprint>
Aries Blueprint Extensions
62605GiCommunity
Bowl1010
jax 1529 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Aries JNDI integration
Provides JNDI-based access to OSGi Service
Registry
<blueprint xmlns=...>
<bean id="bloggingServiceComponent"
class="org.apache.aries.BloggingServiceImpl">
</bean>
<service ref="bloggingServiceComponent"
interface="org.apache.aries.samples.blog.api.BloggingService"/>
...
</blueprint>
registerService
InitialContext ic = new InitialContext();
BloggingService blog= ic.lookup("osgi:services/"
+ BloggingService.class.getName());
getService
A way for a Web component to
access a Blueprint component
OSGi
Service Registry
JNDI Context
62605GiCommunity
Bowl1010
1629 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Application-level Metadata and Archive
Apache Aries defines the notion of an
ā€œenterprise bundle archiveā€ (EBA) to
represent a multi-bundle application.
Constituent bundles may be
contained (ā€œby-valueā€) or referenced
from a bundle repository.
Config by exception - absence of
APPLICATION.MF metadata means:
ā€¢ application content is the set of bundles
contained
by-value plus any repository-hosted
dependencies identified during
deployment.
Application
EntitiesEntities
BlueprintBlueprint
Web componentsWeb components
<web.xml />
<persistence.xml/>
<blueprint.xml/>
APPLICATION.MF
62605GiCommunity
Bowl1010
1729 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Aries Application Assembly and Deploy
ā€œapplicationā€ project: resolve and deploy .eba archives
ā€“ bundle converter extn point e.g for war to wab
conversion
ā€“ application resolver extn point for different type of
repository e.g Felix OBR
ā€“ application context extn point for runtime specific
installation and management of bundles
Manifest-Version: 1.0
Application-ManifestVersion: 1.0
Application-Name: Blog Application
Application-SymbolicName: aries.sample.blog
Application-Version: 1.0
Application-Content:
aries.sample.blog; version=1.0.0,
aries.sample.blog-api; version=1.0.0,
aries.sample.blog-persistence; version=1.0.0,
aries.sample.blog-servlet; version=1.0.0
Uses APPLICATION.MF metadata
Metadata can be generated from
POM configuration or authored
Eclipse-based tools for authoring
I
62605Gi-
Ezn
1829 Sep 2010
Ian Robinson (c) IBM Corp, 2010
RAD V8
OSGi App Devt Tool
WAS v7 OSGi FeP
Test Environment
WAS v7 OSGi FeP
Test Environment
Eclipse
WTP 3.6WTP 3.6 PDEPDE
Graphical
Application Editor
Graphical
Application Editor
Developer Productivity
(e.g. content assist, validation, re-factoring)
Developer Productivity
(e.g. content assist, validation, re-factoring)
Graphical Creation
Wizards
Graphical Creation
Wizards
Creation / Import /
Export Tools
Creation / Import /
Export Tools
Tutorials and
Documentation
Tutorials and
Documentation
Publish and Run
WAS v7 Server
Support
WAS v7 Server
Support
Free Eclipse Plugin for OSGi Applications
Graphical tools to develop OSGi applications and
bundles
Includes features that increase developer productivity
Creates OSGi Applications for any Aries-based server
runtime.
Eclipse WTP 3.6 (Helios) required
http://marketplace.eclipse.org/content/ibm-rational-
development-tools-osgi-applications
OSGi Application Development Tools
Blueprint Graphical
Editor
Blueprint Graphical
Editor
Bundle ExplorerBundle Explorer
SCA / OSGi
Integration
SCA / OSGi
Integration
OSGi Application Support in RAD V8
Provide integrated development and test of
OSGi Applications on the WebSphere platform
Integrated with Web Tools, JEE productivity tools, and
other capabilities in RAD
Supports deployment to WAS v7 OSGi FeP and
includes the FeP in the WAS Test Environment
SCA support for OSGi Applications
Additional OSGi tools:
Graphical and wiring editor for Blueprint
Bundle Explorer
Tools for WAS OSGi extensions / Value-add
http://www-01.ibm.com/software/awdtools/developer
/application/index.html
ibm.vo.ehe.example.blog.app
1.0
Aries Slag
Gen eraIInformation
Spedfiesthegeneralinformation for this application,
Symbolic Name (ID):
Version:
Name:
e005GiCommunity
Ewen!2010
--s--20 Import DR'.
OSGi Application Import
rImport an OSGi application into theworkspace.
EBA file: DS COM.ibm.ws.eba.example.blag.eba v Browse...
Project name: com.ibm.ws.eba.example.blog.app
Target runtime: <None> E [
New... 1
Bundlesdoindude:
MIiii.com.ibm.ws.eba.exampk.blog.ap(1.0.0)
El 4:rcom.ibm.ws.eba.exampk.blog.persistence (1.0.0)
SelectAll
ClearAllMI *com.ibm.ws.eba.exampk.blog.web(1.0.0)
El *com.ibm.ws.eba.exampk.blog(1.0.0)
< Back 1 Next > I Finish [ Cancel
[ILIProject Explorer E-.3-'"__
'Workspace]
com.ibm.json.java
ā–Ŗ com.ibm.ws.eba.example.blog
ā–Ŗ com.ibm.ws.eba.example.blog.api
ā–Ŗ1=,com.ibm.ws.eba.example.blog.app
4.Manifest: Aries Slog
8-2?META-INF
APPLICATION,MF
permissions.perm
..ibm.ws.eba.example.blog.
OSGi Application Manifest
Contained Bundles
Spedfies the OSGi bundles indudedinthis appliption.
o
,
f0com.ibm.ws.eba.example.blog.persistence
O com.ibm.ws.eba.example.blog.web
Add...
[ Remove
Properties...
[ New...
[ Up
sExplicitly Sha red Bundles
Spedfies the OSGibundles induded from the shared
runtimearea.(Use-bundle header)
ā€¢ bm.json.java 1.0.0 Add...
Overview APPLICATION.MF
ā€¢ COM.ibm.os.eba.example.blog.api
com.ibm.ws.eba.example.blog.persisi
com.ibm.ws.eba.example.blog.web 1
com. ws.eba. example.blog 1.0.0
L.5_1
1929 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Development Support for EBAs
OSGi App Dev Tool supports import, creation, and
export of applications
Form-based editor for application manifest
Validation of manifest syntax and
properties
OSGi Bundle Project
Create a sthndalone OSGi bundle project or add it to a
new or existing applimtion.
Projectname NewBundle
trdl We defaultloustion
Location: Browse...C: 'yedipse 36Vorkspace',NewBundle
New Si Bundle Project_ _
Project lomtion
Target runtimeL New Runtime.,,
rConfiguration
OSGiWebConfiguration
<None>
Modify...
< Back. Next > Finish Cancel
<custom>
Default Configuration
JavaServer Faces v1.1 Project
JavaServer Faces v1.2 Project
JavaServer Faces v2.0 Project
Minimal Configuration
OSGi PA Configuration
OSGi Web Configuration
65005GiCommunity
Bowl2310
YJ
YJ
2029 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Development Support for Web and JPA Bundles
Create OSGi bundle projects with Web or JPA configurations
Can convert existing JEE Web or JPA projects into bundles:
ā€“ Creates or updates a valid bundle manifest
ā€“ Adds a Web-ContextPath or Meta-Persistence header
ā€“ Adds package imports based on current
module contents
Graphical manifest editor for OSGi metadata.
Project build paths respect OSGi visibility rules
ā€“ Supports and enforces modular characteristics
from design through to execution
Plus in RAD: Comprehensive support for
Web and JPA. These tools can continue to
be used as-is in OSGi projects, including:
ā€“ New wizards (Servlet, JSP, etc.)
ā€“ Page designer and other web editors
ā€“ Persistence.xml editor
Details
ID:
Class:
1E1 [17
bloggingServiceComponent
com.ibm.ws.eba.example.blog.BloggingServiceImpl Browse...
Activation:
Scope:
Description:
1:1
1
ilefgrepc.5gttingj
0 Method references
1Nr.Blueprint
blogAuthorManager (Bean)
blogCommentManager (Bean)
blogEniryManager (Bean)
;FE,bloggingServiceComponent (Beal,
blogAuthorManager (Property)
blogCommentManager (Property.
blogEntryManager (Property)
com.ibm .ws.eba e xample b log . api.B
commentPersistenceService (Refere
persistenceManager (Reference)
1 <1
blueprint. xr721
e..Blueprint XML Editor
Overview
type filter text
3
[ Add...
[ Remove
r
I Down
Design Scum
Community
Ewen!2010
62605Gi 2129 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Development Support for Blueprint Bundles
Blueprint creation wizard
ā€“ Supports extension schema including JPA and transactions
A blueprint editor, including:
ā€“ Source page with syntax highlighting, content assist
ā€“ Form-based editing similar to Java EE deployment
descriptors (RAD)
ā€“ Syntax and reference validation
ā€“ Hyperlinking to impl
classes
ā€“ Refactoring support
Community
Bowl1010
62605Gi 2229 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Aries Innovation
Blueprint Bean Interceptors ā€“ RFP 137
Blueprint Transactions ā€“ RFP 138
Message Driven Services ā€“ RFP 131
Subsystem Metadata and Lifecycle ā€“ RFP
121
Container-managed JPA - RFP 115
ā€“ RFP 136 (Classpath scanning)
ā€“ RFP 139 (Bytecode weaving)
META-INF/services RFP 128
(Blueprint annotations, no RFP yet)
Apache
AR1 ES
62605GiCarrfflnunity
Bowl1010
2329 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Application exploitation of OSGi in
WebSphere
OSGi has been used internally in WAS since V6.1
and in Eclipse since R3.
Application-level exploitation is introduced in
the WebSphere Application Server V7 Feature
Pack for OSGi Applications and JPA 2.0
http://www.ibm.com/websphere/was/osgi
ā€“ Generally available since May 2010
ā€“ Early Program available since Nov 2009
Tools support in RAD V8:
http://www.ibm.com/software/awdtools/developer/application/
Community
Ewen!2010
1
1
s
I I
62605Gi 2429 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Modular Deployment
Common bundles factored out of the applications and used at specific
versions
webA.jar
WEB-INF/classes/servletA.class
WEB-INF/web.xml
META-INF/MANIFEST.MF
webA.jar
WEB-INF/classes/servletA.class
WEB-INF/web.xml
META-INF/MANIFEST.MF
webA.jar
WEB-INF/classes/servletA.class
WEB-INF/web.xml
META-INF/MANIFEST.MF
webA.jar
WEB-INF/classes/servletA.class
WEB-INF/web.xml
META-INF/MANIFEST.MF
webA.jar
WEB-INF/classes/servletA.class
WEB-INF/web.xml
META-INF/MANIFEST.MF
webA.jar
WEB-INF/classes/servletA.class
WEB-INF/web.xml
META-INF/MANIFEST.MF
Bundle Repository
Bundle Repository
Import-Package
webA.jar
WEB-INF/classes/servletA.class
WEB-INF/web.xml
META-INF/MANIFEST.MF
webA.jar
WEB-INF/classes/servletA.class
WEB-INF/web.xml
META-INF/MANIFEST.MF
webA.war
WEB-INF/classes/servletA.class
WEB-INF/web.xml
WEB-INF/lib/ā€¦
webA.war
WEB-INF/classes/servletA.class
WEB-INF/web.xml
WEB-INF/lib/ā€¦
logging f/w jar
persistence f/w jar
MVC f/w jar
DI f/w jar
webA.war
WEB-INF/classes/servletA.class
WEB-INF/web.xml
WEB-INF/lib/ā€¦
webA.war
WEB-INF/classes/servletA.class
WEB-INF/web.xml
WEB-INF/lib/ā€¦
logging f/w jar
persistence f/w jar
MVC f/w jar
DI f/w jar
webA.war
WEB-INF/classes/servletA.class
WEB-INF/web.xml
WEB-INF/lib/ā€¦
webA.war
WEB-INF/classes/servletA.class
WEB-INF/web.xml
WEB-INF/lib/ā€¦
logging f/w jar
persistence f/w jar
MVC f/w jar
DI f/w jar
webA.war
WEB-INF/classes/servletA.class
WEB-INF/web.xml
WEB-INF/lib/ā€¦
webA.war
WEB-INF/classes/servletA.class
WEB-INF/web.xml
WEB-INF/lib/ā€¦
logging f/w jar
persistence f/w jar
MVC f/w jar
DI f/w jar
logging f/w jar
persistence f/w jar
MVC f/w jar
DI f/w jar
ā€¢ Manage multiple
versions of libraries
across an enterprise
ā€¢ Isolate application
dependencies from the
server runtime
ā€¢ Centralized location to
deliver critical fixes
ā€¢ Flexibility to update to
new versions one app at
a time
IDTroubleshooting
['Service integration
I=1 UDDI
62605GiCommunity
Ewing2010
Integrated Solutions Console Welcome Help ILogout
Cell=irobinsNodeOlCell, Profile=AppSni01
View: IAll tasks
Close page
s Welcome
E l Guided Activities
E+ Servers
['Applications
I=1 Services
E l Resources
E+ Security
El Environment
Internal bundle repository
Internal bundle repository> comibmjson.java
The internal bundle repository is used to store bundles that are referenced by OSGi applications running in
WebSphere Application Server. When an OSGi application is imported as an assetr the provisioner attempts to
satisfy all its dependencies by using the contents of the asset, the contents of the internal bundle repository,
and the contents of any available external bundle repositories.
Configuration
Exported packages
com.ibm.json.javawersion=ā€œ1.0.0"
Virtual hosts
Update global Web server plu
configuration
s WebSphere variables
s Shared libraries
s Replication domains
E Naming
OSGi bundle repositories
s
s Internal bundle repository
E System a MFIIT3Dam.rri
ID Users and Groups
I=1 Monitoring and Tuning,
General Properties
Bundle symbolic name
CO.T. Ibm.json jays
Bundle version
1.0.0
Bundle name
JSCIN4J
Bundle description
Imported packages
2529 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Modular Deployment in WAS
___-------
___-----
_ ā€” -
bundle 6
Bundle C
Bundle
__-------
d'uOSGi
Even,1010
2629 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Details: Isolated and Shared Bundles
In Java EE, modules are isolated within an application
and applications are isolated from one another.
ā€“ Makes sharing modules difficult
OSGi 4.2 all bundles have shared visibility to the
externals of all others bundles within an OSGi
framework (JVM)
ā€“ Makes isolating applications difficult
Java EE App Server
Everything isolated Everything shared
EAR 1
Module A
Module B
Module C
EAR 2
Module A
Module G
Module C
OSGi v4.2 Framework
Isolation
Sharing
J
62605GiCommunity
Bowl1010
2729 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Details: Isolated and Shared Bundles
Equinox 3.5 ā€œnested frameworkā€ support enables
ā€œcomposite bundlesā€ to run in isolated child
frameworks
ā€“ WebSphere installs each OSGi Application into an isolated
child framework.
ā€“ Shared bundles are installed into the (single) parent
framework.
Everything isolated Everything shared
OSGi v4.2 Framework
Java EE App Server
EAR 1
Module A
Module B
Module C
EAR 2
Module A
Module B
Module C
Java EE App Server
EAR 1
Module A
Module B
Module C
EAR 1
Module A
Module B
Module C
EAR 2
Module A
Module B
Module C
EAR 2
Module A
Module B
Module C
WAS V7 OSGi App FeP
EBA 1
Bundle A
Bundle B
Bundle C
EBA 2
Bundle A
Bundle G
Isolated
framework
Isolated
framework
Shared framework
tt.own.ibm.ws.eba.example.bloghapp
Manifest-Version: 1.0
Application-ManifestVersion: 2.0
Application-Name: Aries Blog
Application-SymbolicName: com.ibm.ws.eba.example.blog.app
Application-Version: 1.0 44
Application-Content: com.ibm.ws.eba.example.blog.apivrtersion=1.0.0,
com.ibm.ws.eba.example.blog.persistence:7ersion=1.0.0,
com.ibm.ws.eba.example.blog.webvriersior=1.0.0,
com.ibm.ws.eba.example.blog:version=2.0.0
Use-Bundle: com.ibm.json.java;version=1.0.0
i<1
OverviewAPPLICATION.MF
r
0 -0-
O
62605GiCommunity
Bowl1010
2829 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Example ā€œBlogā€ Application
Blogging
Service
Blog
Persistence
Service
blog-servlet
Web application bundle
META-INF/
persistence.xml
WEB-INF/
web.xml OSGI-INF/blueprint/
blueprint.xml
OSGI-INF/blueprint/
blueprint.xml
JNDI EM
blog.eba
blog
blog-persistence
blog-api
isolated content
shared content
ID
0
1
1
wsadmin>list()
Framework Version Node Server
SharedBundles 7.0.0 irobinsNode01 serverl
com.ibm.ws.eba.example.blog.app 1.0.0 irobinsNode01 serverl
wsaā€¢min connec u
CWSAJ0035I: Connecting to framework SharedBundles_7.0.0 on node irobinsNode01 an
cprvpr qprup.r1
401WSAJ0036I: Successfully connected to framework SharedBundles_7.0.0.
wsadmin>ss()
ID State Bundle
0 ACTIVE org.eclipse.osgi_3.5.2.R35x_v20100126
1 ACTIVE shared.bundle.framework_0.0.0
2 ACTIVE com.ibm.json.java_1.0.0
ACTIVE com.ibm.ws.eba.example.blog.app_1.0.0 ./
wsadmin>connect(1)
CWSAJ0035I: Connecting to framework com.ibm.ws.eba.example.blog.app_1.0.0 on
e innhinANnHt.01 And Apbrypq- Ap.mit.r1
ASAJ0036I: Successfully connected to framework com.ibm.ws.eba.example.blog.ap
1.0.0.
wsadmin>ss()
ID State Bundle
0 ACTIVE org.eclipse.osgi_3.5.2.R35x_v20100126
1 ACTIVE com.ibm.ws.eba.example.blog.app_1.0.0
2 ACTIVE com.ibm.ws.eba.example.blog_1.0.0
3 ACTIVE com.ibm.ws.eba.example.blog.web_1.0.0
4 ACTIVE com.ibm.ws.eba.example.blog.persistence_1.0.0
Indmin> ACTIVE
com.ibm.ws.eba.example.blog.api_1.0.0
2929 Sep 2010
Ian Robinson (c) IBM Corp, 2010
JMX and Isolated Frameworks in Action
12' 05G.Community
Bowl1010
3029 Sep 2010
Ian Robinson (c) IBM Corp, 2010
OSGi Application
BundleBundle
Bundle
POJO
POJOs assembled using a Blueprint
context and scoped by an OSGi Bundle.
OSGi Bundles assembled in an OSGi
Application and integrated through
services in the OSGi service registry
SCA Composite assembled from
heterogeneous components including an
OSGi Application component, and
integrated through SCA services with
configurable bindings (JMS, web
servicesā€¦).
POJO
POJO
OSGi Applications and SCA:
the assembly food chain
SCA Composite
Component
EARPOJO
62605GiCommunity
Bowl1010
3129 Sep 2010
Ian Robinson (c) IBM Corp, 2010
Summary
Java EE and OSGi are good for each other.
ā€“ Java EE defines standard enterprise technologies with
contracts for applications and runtimes
ā€“ OSGi encourages and enforces modular design and
enables modular deployment
The Apache Aries project delivers enterprise OSGi
technologies that have been integrated into a
number of runtimes.
ā€“ As well as experimental implementation of new EEG
RFPs to inform the specs.
WAS V7 and RAD integration of Aries provides
complete develop-test-deploy-manage environment
for modular enterprise applications.
62605GiCommunity
Bowl1010
3229 Sep 2010
Ian Robinson (c) IBM Corp, 2010
References
Apache Aries
http://incubator.apache.org/aries/
Apache Geronimo v3.0-M1:
http://geronimo.apache.org/
WAS V7 Feature Pack for OSGi Applications and JPA 2.0
http://www.ibm.com/websphere/was/osgi
OSGi Application Development Plugin:
http://marketplace.eclipse.org/content/ibm-rational-
development-tools-osgi-applications
Rational Application Developer V8:
http://www.ibm.com/software/awdtools/developer/application/

More Related Content

What's hot

Websocket 1.0
Websocket 1.0Websocket 1.0
Websocket 1.0
Arun Gupta
Ā 
FraSCAti with OSGi
FraSCAti with OSGiFraSCAti with OSGi
FraSCAti with OSGi
OSGi User Group France
Ā 

What's hot (19)

TDC 2011: OSGi-enabled Java EE Application
TDC 2011: OSGi-enabled Java EE ApplicationTDC 2011: OSGi-enabled Java EE Application
TDC 2011: OSGi-enabled Java EE Application
Ā 
Java one 2015 [con3339]
Java one 2015 [con3339]Java one 2015 [con3339]
Java one 2015 [con3339]
Ā 
Java EE 7 for Real Enterprise Systems
Java EE 7 for Real Enterprise SystemsJava EE 7 for Real Enterprise Systems
Java EE 7 for Real Enterprise Systems
Ā 
Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Have You Seen Java EE Lately?
Have You Seen Java EE Lately?
Ā 
Java EE 7 at JAX London 2011 and JFall 2011
Java EE 7 at JAX London 2011 and JFall 2011Java EE 7 at JAX London 2011 and JFall 2011
Java EE 7 at JAX London 2011 and JFall 2011
Ā 
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Ā 
Java ee7 1hour
Java ee7 1hourJava ee7 1hour
Java ee7 1hour
Ā 
Enterprise Java in 2012 and Beyond, by Juergen Hoeller
Enterprise Java in 2012 and Beyond, by Juergen Hoeller Enterprise Java in 2012 and Beyond, by Juergen Hoeller
Enterprise Java in 2012 and Beyond, by Juergen Hoeller
Ā 
Oracle 10g Application Server
Oracle 10g Application ServerOracle 10g Application Server
Oracle 10g Application Server
Ā 
Websocket 1.0
Websocket 1.0Websocket 1.0
Websocket 1.0
Ā 
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
Ā 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012
Ā 
[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6
[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6
[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6
Ā 
FraSCAti with OSGi
FraSCAti with OSGiFraSCAti with OSGi
FraSCAti with OSGi
Ā 
Implementing Applications with SOA and Application Integration Architecture
Implementing Applications with SOA and Application Integration ArchitectureImplementing Applications with SOA and Application Integration Architecture
Implementing Applications with SOA and Application Integration Architecture
Ā 
Best Way to Write SQL in Java
Best Way to Write SQL in JavaBest Way to Write SQL in Java
Best Way to Write SQL in Java
Ā 
JSF 2.2
JSF 2.2JSF 2.2
JSF 2.2
Ā 
Java EE 7 and HTML5: Developing for the Cloud
Java EE 7 and HTML5: Developing for the CloudJava EE 7 and HTML5: Developing for the Cloud
Java EE 7 and HTML5: Developing for the Cloud
Ā 
JAX-RS 2.0: RESTful Web services on steroids at Geecon 2012
JAX-RS 2.0: RESTful Web services on steroids at Geecon 2012JAX-RS 2.0: RESTful Web services on steroids at Geecon 2012
JAX-RS 2.0: RESTful Web services on steroids at Geecon 2012
Ā 

Viewers also liked

Ceddet el fenĆ³meno de la falsificaciĆ³n v2 (1)
Ceddet el fenĆ³meno de la falsificaciĆ³n v2 (1)Ceddet el fenĆ³meno de la falsificaciĆ³n v2 (1)
Ceddet el fenĆ³meno de la falsificaciĆ³n v2 (1)
FundaciĆ³n CEDDET
Ā 
Ingenieria industrial nixon zarate
Ingenieria industrial nixon zarateIngenieria industrial nixon zarate
Ingenieria industrial nixon zarate
nixon13zarate
Ā 
Cuando Quiero Dibujar Puedo
Cuando Quiero Dibujar PuedoCuando Quiero Dibujar Puedo
Cuando Quiero Dibujar Puedo
Tatica Leandro
Ā 
Tripes_CV_eng_20160217
Tripes_CV_eng_20160217Tripes_CV_eng_20160217
Tripes_CV_eng_20160217
Michal Tripes
Ā 
Jerarquia de proxys sibling ing freddy alfonso beltran
Jerarquia de proxys sibling ing freddy alfonso beltranJerarquia de proxys sibling ing freddy alfonso beltran
Jerarquia de proxys sibling ing freddy alfonso beltran
beppo
Ā 
Exp redesiids lv2_06
Exp redesiids lv2_06Exp redesiids lv2_06
Exp redesiids lv2_06
Carlos Gomez
Ā 

Viewers also liked (20)

CanciĆ³N De Boda
CanciĆ³N De BodaCanciĆ³N De Boda
CanciĆ³N De Boda
Ā 
Apt pics ppt1
Apt pics   ppt1Apt pics   ppt1
Apt pics ppt1
Ā 
Ceddet el fenĆ³meno de la falsificaciĆ³n v2 (1)
Ceddet el fenĆ³meno de la falsificaciĆ³n v2 (1)Ceddet el fenĆ³meno de la falsificaciĆ³n v2 (1)
Ceddet el fenĆ³meno de la falsificaciĆ³n v2 (1)
Ā 
Ingenieria industrial nixon zarate
Ingenieria industrial nixon zarateIngenieria industrial nixon zarate
Ingenieria industrial nixon zarate
Ā 
Cuando Quiero Dibujar Puedo
Cuando Quiero Dibujar PuedoCuando Quiero Dibujar Puedo
Cuando Quiero Dibujar Puedo
Ā 
Cheil Hangarsession: Media Monks - Crafted with care and coded with coffee
Cheil Hangarsession: Media Monks - Crafted with care and coded with coffeeCheil Hangarsession: Media Monks - Crafted with care and coded with coffee
Cheil Hangarsession: Media Monks - Crafted with care and coded with coffee
Ā 
AvailabilityGuardā„¢ de Continuity Software
AvailabilityGuardā„¢ de Continuity SoftwareAvailabilityGuardā„¢ de Continuity Software
AvailabilityGuardā„¢ de Continuity Software
Ā 
Tripes_CV_eng_20160217
Tripes_CV_eng_20160217Tripes_CV_eng_20160217
Tripes_CV_eng_20160217
Ā 
PoesĆ­a de la experiencia: dos generaciones
PoesĆ­a de la experiencia: dos generacionesPoesĆ­a de la experiencia: dos generaciones
PoesĆ­a de la experiencia: dos generaciones
Ā 
4 wd
4 wd4 wd
4 wd
Ā 
Bebidas funcionales, Aloe Vera Drink, BIO
Bebidas funcionales, Aloe Vera Drink, BIOBebidas funcionales, Aloe Vera Drink, BIO
Bebidas funcionales, Aloe Vera Drink, BIO
Ā 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
Ā 
CDU Fokus Aprile 2015
CDU Fokus Aprile 2015CDU Fokus Aprile 2015
CDU Fokus Aprile 2015
Ā 
Jerarquia de proxys sibling ing freddy alfonso beltran
Jerarquia de proxys sibling ing freddy alfonso beltranJerarquia de proxys sibling ing freddy alfonso beltran
Jerarquia de proxys sibling ing freddy alfonso beltran
Ā 
8826869222 Jaipur Tourism City Appu Ghar Shops Villas
8826869222 Jaipur Tourism City Appu Ghar Shops Villas8826869222 Jaipur Tourism City Appu Ghar Shops Villas
8826869222 Jaipur Tourism City Appu Ghar Shops Villas
Ā 
Exp redesiids lv2_06
Exp redesiids lv2_06Exp redesiids lv2_06
Exp redesiids lv2_06
Ā 
San martin de porres
San martin de porresSan martin de porres
San martin de porres
Ā 
Measuring IPv6 ISP performance
Measuring IPv6 ISP performanceMeasuring IPv6 ISP performance
Measuring IPv6 ISP performance
Ā 
Como crear slideshare en tu telĆ©fono mĆ³vil
Como crear slideshare en tu telĆ©fono mĆ³vilComo crear slideshare en tu telĆ©fono mĆ³vil
Como crear slideshare en tu telĆ©fono mĆ³vil
Ā 
Google web designer
Google web designerGoogle web designer
Google web designer
Ā 

Similar to OSGi Community Event 2010 - Enterprise OSGi in WebSphere and Apache Aries

Playframework + Twitter Bootstrap
Playframework + Twitter BootstrapPlayframework + Twitter Bootstrap
Playframework + Twitter Bootstrap
Kevingo Tsai
Ā 
Ajax Frameworks in the J(2)EE Environment
Ajax Frameworks in the J(2)EE EnvironmentAjax Frameworks in the J(2)EE Environment
Ajax Frameworks in the J(2)EE Environment
starchaser
Ā 
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
IndicThreads
Ā 
Enabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDMEnabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDM
mukulobject
Ā 

Similar to OSGi Community Event 2010 - Enterprise OSGi in WebSphere and Apache Aries (20)

Hybrid Applications
Hybrid ApplicationsHybrid Applications
Hybrid Applications
Ā 
Jboss
JbossJboss
Jboss
Ā 
Enterprise Spring Building Scalable Applications
Enterprise Spring Building Scalable ApplicationsEnterprise Spring Building Scalable Applications
Enterprise Spring Building Scalable Applications
Ā 
GlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and FutureGlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and Future
Ā 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Review
Ā 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010
Ā 
Playframework + Twitter Bootstrap
Playframework + Twitter BootstrapPlayframework + Twitter Bootstrap
Playframework + Twitter Bootstrap
Ā 
OpenESB
OpenESBOpenESB
OpenESB
Ā 
Ajax Frameworks in the J(2)EE Environment
Ajax Frameworks in the J(2)EE EnvironmentAjax Frameworks in the J(2)EE Environment
Ajax Frameworks in the J(2)EE Environment
Ā 
Java one 2010
Java one 2010Java one 2010
Java one 2010
Ā 
Java EE 8 Overview (Japanese)
Java EE 8 Overview (Japanese)Java EE 8 Overview (Japanese)
Java EE 8 Overview (Japanese)
Ā 
Oop2008 RESTful services with GWT and Apache CXF
Oop2008 RESTful services with GWT and Apache CXFOop2008 RESTful services with GWT and Apache CXF
Oop2008 RESTful services with GWT and Apache CXF
Ā 
OSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 IndiaOSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 India
Ā 
Jspx Jdc2010
Jspx Jdc2010Jspx Jdc2010
Jspx Jdc2010
Ā 
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
Ā 
Enterprise service bus part 2
Enterprise service bus part 2Enterprise service bus part 2
Enterprise service bus part 2
Ā 
DĆ©ploiement dynamique d'applications OSGi sur le Cloud
DĆ©ploiement dynamique d'applications OSGi sur le CloudDĆ©ploiement dynamique d'applications OSGi sur le Cloud
DĆ©ploiement dynamique d'applications OSGi sur le Cloud
Ā 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
Ā 
Enabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDMEnabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDM
Ā 
Cloud State of the Union for Java Developers
Cloud State of the Union for Java DevelopersCloud State of the Union for Java Developers
Cloud State of the Union for Java Developers
Ā 

More from mfrancis

Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
mfrancis
Ā 
How OSGi drives cross-sector energy management - Jƶrn TĆ¼mmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jƶrn TĆ¼mmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jƶrn TĆ¼mmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jƶrn TĆ¼mmler (SMA Solar Tech...
mfrancis
Ā 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
mfrancis
Ā 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
mfrancis
Ā 

More from mfrancis (20)

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Ā 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)
Ā 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Ā 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
Ā 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Ā 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
Ā 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
Ā 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
Ā 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Ā 
OSGi CDI Integration Specification - Ray AugƩ (Liferay)
OSGi CDI Integration Specification - Ray AugƩ (Liferay)OSGi CDI Integration Specification - Ray AugƩ (Liferay)
OSGi CDI Integration Specification - Ray AugƩ (Liferay)
Ā 
How OSGi drives cross-sector energy management - Jƶrn TĆ¼mmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jƶrn TĆ¼mmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jƶrn TĆ¼mmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jƶrn TĆ¼mmler (SMA Solar Tech...
Ā 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Ā 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
Ā 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Ā 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Ā 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
Ā 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Ā 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
Ā 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Ā 
How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)
Ā 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
Ā 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(ā˜Žļø+971_581248768%)**%*]'#abortion pills for sale in dubai@
Ā 

Recently uploaded (20)

Finology Group ā€“ Insurtech Innovation Award 2024
Finology Group ā€“ Insurtech Innovation Award 2024Finology Group ā€“ Insurtech Innovation Award 2024
Finology Group ā€“ Insurtech Innovation Award 2024
Ā 
šŸ¬ The future of MySQL is Postgres šŸ˜
šŸ¬  The future of MySQL is Postgres   šŸ˜šŸ¬  The future of MySQL is Postgres   šŸ˜
šŸ¬ The future of MySQL is Postgres šŸ˜
Ā 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Ā 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Ā 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
Ā 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Ā 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
Ā 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Ā 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Ā 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Ā 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Ā 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Ā 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Ā 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Ā 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
Ā 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Ā 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Ā 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Ā 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
Ā 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Ā 

OSGi Community Event 2010 - Enterprise OSGi in WebSphere and Apache Aries

  • 1. axe2010LONDON 060ā€¢05GCommunity Event2010 Enterprise OSGi in WebSphere and Apache Aries Ian Robinson, IBM
  • 2. 62605GiCommunity Bowl1010 129 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Agenda OSGi and Java Enterprise ā€“ who needs who? The Culture Clash Apache Aries Whatā€™s Next in Aries and Enterprise OSGi? Aries and WebSphere Application Sever
  • 3. 62605GiCommunity Bowl1010 A jpt. 229 Sep 2010 Ian Robinson (c) IBM Corp, 2010 IDL JDBC JNDI JAXP JAAS JMX RMI-IIOP Enterprise APIs in Java SE (Required for Java EE) Servlet JSP Web Container JavaM ail JAF JAX- RPC JAX- WS Web Service s WS Metada ta JMS JTA JACC JAXR Manag ement JPA EJB SAA J HTTP/ SSL Direct dependency Optional dependencies JSTL JSF JAX B JCA Deb ug Com mon Anno tation s Java EE Web technologies StAX Indirect (soft) dependency JAX- RS JASPI C CDI& DI OSGi and Java Enterprise ā€“ who needs who? HTTP Session Replication Connection Management Persistence Providers User Registries Event Mgmt Logging and Tracing MBean Server Admin Console and scripting DataSources Messaging Engines Security Transport Channels Workload Management HTTP Serving and routing High Availability Management Transaction Logging and Recovery Thread management Classloading Provisioning Monitoring Policy and SLA mgmt Configuration ā€¦
  • 4. 05G1 kwo Applications (bundles) Services Life Cycle Module Java Execution Env OS + Hardware 329 Sep 2010 Ian Robinson (c) IBM Corp, 2010 OSGi and Java Enterprise ā€“ who needs who? IDL JDBC JNDI JAXP JAAS JMX RMI-IIOP Enterprise APIs in Java SE (Required for Java EE) Servlet JSPWeb Container Ja va M ail J A F JA X- R P C JA X- W S W eb Se rvi ce s W S M et ad at a J M S JT A JA C C JA X R M an ag e m en t JP A EJ B S A A J H T T P/ S SL Direct dependency Optional dependencies JS TL JS F J A X B J C A D e b u g C o m m o n A n n o t a t i o n s Java EE Web technologies S t A X Indirect (soft) dependency JA X- R S J A S PI C C DI & DI HTTP Session ReplicationConnection ManagementPersistence ProvidersUser Registries Event Mgmt Logging and TracingMBean Server Admin Console and scripting DataSourcesMessaging Engines Security Transport ChannelsWorkload Management HTTP Serving and routing High Availability Management Transaction Logging and Recovery Thread managementClassloading Provisioning Monitoring Policy and SLA mgmt Configuration Java EE App Server Applications Enterprise Services Metadata and enterprise service-enablement Three ways of looking at Enterprise OSGi technologies 1 2 3
  • 5. 12' 05G.Community Bowl1010 429 Sep 2010 Ian Robinson (c) IBM Corp, 2010 The Culture Clash Java EE OSGi An application is a collection of wars/jar modules scoped by an EAR There is no multi-bundle ā€œapplicationā€ scope other than an OSGi framework Applications are isolated from one another in a server Bundle exports are visible throughout the framework Container-centric. Distinct contracts for containers and applications All bundles are created equal. Defines complete enterprise programming model (JTA, JPA, Web, JMX, Web, EJB, JAX-WSā€¦) OSGi Enterprise Specification V4.2 defines services-based access to Java EE technologies
  • 6. 62605GiCommunity Bowl1010 529 Sep 2010 Ian Robinson (c) IBM Corp, 2010 OSGi Enterprise Specification Released 22 March 2010 ā€“ The product of the OSGi Enterprise Expert Group (EEG) Brings Enterprise technologies and OSGi together Using existing Java SE/EE specifications: ā€“ JTA, JPA, JNDI, JMX, WebAppsā€¦ Plus Spring-derived Blueprint component model and DI container Java EE provides the core enterprise application programming model Deploying modules as OSGi bundles simplifies reuse between applications, provides versioning, encourages (and enforces) modular design and enables dynamic module updates.
  • 7. 62605Gi- Ezn Apache ARIES 629 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Enterprise OSGi in Apache Aries Apache Aries Project started in Sep 2009 http://incubator.apache.org/aries/ ā€“ Delivering a set of pluggable Java components enabling an enterprise OSGi application programming model. ā€“ Implementations and extensions of application-focused specifications defined by the OSGi Alliance Enterprise Expert Group (EEG) and an assembly format for multi-bundle applications, for deployment to a variety of OSGi based runtimes. ā€“ to build a broad development community to encourage implementation and adoption of EEG specs Just delivered 2nd (incubator) release. ā€“ OSGi Compliance Tests published for each release. Aries componentry supporting an enterprise OSGi programming model has been integrated into both Geronimo and WebSphere Application Server. ā€“ As well as Apache Felix Karaf, JBossOSGi and others Project was 1 year old last week
  • 8. 62605GiCommunity Bowl1010 729 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Aries projects includeā€¦ JMX JTA integration Blueprint container JPA integration JNDI integration Application assembly and deployment Samples, documentation, integratorā€™s guide http://svn.apache.org/repos/asf/incubator/aries/trunk/
  • 9. O MBean Serve O Ā«MBean>> Bundle State MBean 1111111111111111111111111111111111111111111111111 .1111111111111111111111111111111111111111111111111111111111111111111 """"""""."""""""""""""""""""""""". Ā«MBeanĀ» Package St ate MBean Immimmimmimmimmimmimmimmimmim '1111111111111111 Ā«M3ean>> Fram ework MBean 1111111111111111111111111111111111111111111111111111111111111111111 Ā«M3ean>> Service St ate MBean 11111111111111111111111111111111111111111111111111111111111111111111 111AV /ā€”NC !VIC 1 ICI 661 um ll ummummummummummummummum <4V1BeanĀ» D.rrn:e 91111111111111111111111111111111111111111111111111111111111111111111 W III 1151. PL./ 11 Ad min MBean "I11111111111111111111111111111111111111111111111111111111111111111111 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,1111.......... Ā«MBeanĀ» Provisi onin g ServiceM Bean "mmimmimmimmimmimmimmimmimmimm Ā«MBeanĀ» User Adm in MBean "111111111111111111111111111111111111111111111111111111111111111111111..... 1 jax,.., 829 Sep 2010 6'605GCommunity Event 1:10 Aries )MX Integration Implementation of OSGi JMX specification. o Aries JMX bundle automatically registers the JMX MBeans into any javax.management.MBeanServer service in the OSGi Service Registry. PermissionAdrnin Cnnficriratinn Admin Provisioning Service User Adrrin Ian Robinson (c) IBM Corp, 2010 829 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Aries JMX Integration Implementation of OSGi JMX specification. Aries JMX bundle automatically registers the JMX MBeans into any javax.management.MBeanServer service in the OSGi Service Registry. JMX OSGi Manager <<MBean>> Framework MBean <<MBean>> Bundle State MBean <<MBean>> Service St ate MBean <<MBean>> Package St ate MBean <<MBean>> Configuration Admin MBean <<MBean>> Permission Admin MBean <<MBean>> Provisioning ServiceMBean <<MBean>> User Admin MBean PermissionAdmin Configuration Admin Provisioning Service User Admin MBean Server <<MBean>> Blue print MBean Framework MBeans Compendium MBeans Additional Aries MBeans
  • 10. XA Protocol 7 [TA Provider Transaction Synchroni: ation Registry ((interfaceĀ» XAResource an aged Application Imp! Application Container Impl -source onager Impl XAResource Imp! User Transaction Transaction Manager 62605GiCommunity Ewen!2010 .7* a resource specific service 929 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Aries JTA integration Apache Aries integrates the OSGi Transaction Service Ref Impl from Apache Geronimo. This spec is a good example of the OSGi/Java EE culture clash: ā€“ Different services for application and container
  • 11. 62605GiCarrfflnunity Bowl1010 bond e service bund:e jax,.. 1029 Sep 2010 Ian Robinson (c) IBM Corp, 2010 OSGi Services ā€“ No Java EE analog Services registered in Service Registry. Services are dynamic Clients (bundle B) need to cope with them going away There is no analog for dynamic services in Java EE. S
  • 12. 12' 05G.Community Bowl1010 1129 Sep 2010 Ian Robinson (c) IBM Corp, 2010September 8th 2010 Using Services can be hard private BundleContext ctx; private AtomicReference<LogService> ls = new AtomicReference<LogService>(); private AtomicReference<ServiceReference> lr = new AtomicReference<ServiceReference>(); public void start(BundleContext ctx) throws InvalidSyntaxException { this.ctx = ctx; ctx.addServiceListener(this, "(objectClass=org.osgi.service.log.LogService)"); ServiceReference ref = ctx.getServiceReference(LogService.class.getName()); if (ref != null) { ls.set((LogService) ctx.getService(ref)); lr.set(ref); } } @Override public void serviceChanged(ServiceEvent event) { ServiceReference ref = event.getServiceReference(); if (ls.get() == null && event.getType() == ServiceEvent.REGISTERED) { ls.set((LogService) ctx.getService(ref)); } else if (ls.get() != null && event.getType() == ServiceEvent.UNREGISTERING && ref == lr.get()) { ref = ctx.getServiceReference(LogService.class.getName()); if (ref != null) { ls.set((LogService) ctx.getService(ref)); lr.set(ref); } } }
  • 13. 62605G1 ā€¢_ Carrfflnunity Bowl1010 1229 Sep 2010 Ian Robinson (c) IBM Corp, 2010September 8th 2010 Blueprint Simplification public class Bean { private LogService log; void setLog(LogService logService) { log = logService; } void process(Order o) { log.log(LOG_INFO, ā€œprocessing: ā€œ + o); } } <blueprint> <bean id=ā€shopā€ class=ā€org.example.ecomm.Beanā€> <property name=ā€logā€> <reference interface=ā€org.osgi.service.log.LogServiceā€/> </property> </bean> </blueprint>
  • 14. 62605GiCommunity Bowl1010 1329 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Aries Blueprint Container XML Blueprint definition describes component configuration and scope ā€“ Optionally publish and consume components to/from OSGi service registry. Simplifies unit test outside either Java EE or OSGi r/t. The Aries BP container implementation is highly extensible: ā€“ Namespace handlers supported to extend the Blueprint definitions ā€“ Bean interceptors can be registered by handlers Other Aries components contribute handlers ā€“ ā€œjpaā€ and ā€œjtaā€ handlers. dependencies injected consumes servicepublishes service A static assembly and configuration of components (POJOs) Blueprint bundle OSGI-INF/blueprint/ blueprint.xml
  • 15. 62605GiCommunity Bowl1010 1429 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Container managed JPA support integrated with Aries Blueprint container: ā€“ @PersistenceUnit or @PersistenceContext (managed) ā€“ or <jpa:unit>, <jpa:context> bean property injection ā€“ Familiar development experience for JPA developers ā€“ Load-time enhancement of Entity classes (WebSphere) Same container managed transaction attributes as EJBs: ā€“ Required, RequiresNew, Mandatory, NotSupported, Supports, Never <blueprint> <bean id=ā€shopā€ class=ā€org.example.ecomm.ShopImplā€> <jpa:context property="em" unitname="myUnit"/> <tx:transaction method="*" value="Required"/> </bean> </blueprint> Aries Blueprint Extensions
  • 16. 62605GiCommunity Bowl1010 jax 1529 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Aries JNDI integration Provides JNDI-based access to OSGi Service Registry <blueprint xmlns=...> <bean id="bloggingServiceComponent" class="org.apache.aries.BloggingServiceImpl"> </bean> <service ref="bloggingServiceComponent" interface="org.apache.aries.samples.blog.api.BloggingService"/> ... </blueprint> registerService InitialContext ic = new InitialContext(); BloggingService blog= ic.lookup("osgi:services/" + BloggingService.class.getName()); getService A way for a Web component to access a Blueprint component OSGi Service Registry JNDI Context
  • 17. 62605GiCommunity Bowl1010 1629 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Application-level Metadata and Archive Apache Aries defines the notion of an ā€œenterprise bundle archiveā€ (EBA) to represent a multi-bundle application. Constituent bundles may be contained (ā€œby-valueā€) or referenced from a bundle repository. Config by exception - absence of APPLICATION.MF metadata means: ā€¢ application content is the set of bundles contained by-value plus any repository-hosted dependencies identified during deployment. Application EntitiesEntities BlueprintBlueprint Web componentsWeb components <web.xml /> <persistence.xml/> <blueprint.xml/> APPLICATION.MF
  • 18. 62605GiCommunity Bowl1010 1729 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Aries Application Assembly and Deploy ā€œapplicationā€ project: resolve and deploy .eba archives ā€“ bundle converter extn point e.g for war to wab conversion ā€“ application resolver extn point for different type of repository e.g Felix OBR ā€“ application context extn point for runtime specific installation and management of bundles Manifest-Version: 1.0 Application-ManifestVersion: 1.0 Application-Name: Blog Application Application-SymbolicName: aries.sample.blog Application-Version: 1.0 Application-Content: aries.sample.blog; version=1.0.0, aries.sample.blog-api; version=1.0.0, aries.sample.blog-persistence; version=1.0.0, aries.sample.blog-servlet; version=1.0.0 Uses APPLICATION.MF metadata Metadata can be generated from POM configuration or authored Eclipse-based tools for authoring
  • 19. I 62605Gi- Ezn 1829 Sep 2010 Ian Robinson (c) IBM Corp, 2010 RAD V8 OSGi App Devt Tool WAS v7 OSGi FeP Test Environment WAS v7 OSGi FeP Test Environment Eclipse WTP 3.6WTP 3.6 PDEPDE Graphical Application Editor Graphical Application Editor Developer Productivity (e.g. content assist, validation, re-factoring) Developer Productivity (e.g. content assist, validation, re-factoring) Graphical Creation Wizards Graphical Creation Wizards Creation / Import / Export Tools Creation / Import / Export Tools Tutorials and Documentation Tutorials and Documentation Publish and Run WAS v7 Server Support WAS v7 Server Support Free Eclipse Plugin for OSGi Applications Graphical tools to develop OSGi applications and bundles Includes features that increase developer productivity Creates OSGi Applications for any Aries-based server runtime. Eclipse WTP 3.6 (Helios) required http://marketplace.eclipse.org/content/ibm-rational- development-tools-osgi-applications OSGi Application Development Tools Blueprint Graphical Editor Blueprint Graphical Editor Bundle ExplorerBundle Explorer SCA / OSGi Integration SCA / OSGi Integration OSGi Application Support in RAD V8 Provide integrated development and test of OSGi Applications on the WebSphere platform Integrated with Web Tools, JEE productivity tools, and other capabilities in RAD Supports deployment to WAS v7 OSGi FeP and includes the FeP in the WAS Test Environment SCA support for OSGi Applications Additional OSGi tools: Graphical and wiring editor for Blueprint Bundle Explorer Tools for WAS OSGi extensions / Value-add http://www-01.ibm.com/software/awdtools/developer /application/index.html
  • 20. ibm.vo.ehe.example.blog.app 1.0 Aries Slag Gen eraIInformation Spedfiesthegeneralinformation for this application, Symbolic Name (ID): Version: Name: e005GiCommunity Ewen!2010 --s--20 Import DR'. OSGi Application Import rImport an OSGi application into theworkspace. EBA file: DS COM.ibm.ws.eba.example.blag.eba v Browse... Project name: com.ibm.ws.eba.example.blog.app Target runtime: <None> E [ New... 1 Bundlesdoindude: MIiii.com.ibm.ws.eba.exampk.blog.ap(1.0.0) El 4:rcom.ibm.ws.eba.exampk.blog.persistence (1.0.0) SelectAll ClearAllMI *com.ibm.ws.eba.exampk.blog.web(1.0.0) El *com.ibm.ws.eba.exampk.blog(1.0.0) < Back 1 Next > I Finish [ Cancel [ILIProject Explorer E-.3-'"__ 'Workspace] com.ibm.json.java ā–Ŗ com.ibm.ws.eba.example.blog ā–Ŗ com.ibm.ws.eba.example.blog.api ā–Ŗ1=,com.ibm.ws.eba.example.blog.app 4.Manifest: Aries Slog 8-2?META-INF APPLICATION,MF permissions.perm ..ibm.ws.eba.example.blog. OSGi Application Manifest Contained Bundles Spedfies the OSGi bundles indudedinthis appliption. o , f0com.ibm.ws.eba.example.blog.persistence O com.ibm.ws.eba.example.blog.web Add... [ Remove Properties... [ New... [ Up sExplicitly Sha red Bundles Spedfies the OSGibundles induded from the shared runtimearea.(Use-bundle header) ā€¢ bm.json.java 1.0.0 Add... Overview APPLICATION.MF ā€¢ COM.ibm.os.eba.example.blog.api com.ibm.ws.eba.example.blog.persisi com.ibm.ws.eba.example.blog.web 1 com. ws.eba. example.blog 1.0.0 L.5_1 1929 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Development Support for EBAs OSGi App Dev Tool supports import, creation, and export of applications Form-based editor for application manifest Validation of manifest syntax and properties
  • 21. OSGi Bundle Project Create a sthndalone OSGi bundle project or add it to a new or existing applimtion. Projectname NewBundle trdl We defaultloustion Location: Browse...C: 'yedipse 36Vorkspace',NewBundle New Si Bundle Project_ _ Project lomtion Target runtimeL New Runtime.,, rConfiguration OSGiWebConfiguration <None> Modify... < Back. Next > Finish Cancel <custom> Default Configuration JavaServer Faces v1.1 Project JavaServer Faces v1.2 Project JavaServer Faces v2.0 Project Minimal Configuration OSGi PA Configuration OSGi Web Configuration 65005GiCommunity Bowl2310 YJ YJ 2029 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Development Support for Web and JPA Bundles Create OSGi bundle projects with Web or JPA configurations Can convert existing JEE Web or JPA projects into bundles: ā€“ Creates or updates a valid bundle manifest ā€“ Adds a Web-ContextPath or Meta-Persistence header ā€“ Adds package imports based on current module contents Graphical manifest editor for OSGi metadata. Project build paths respect OSGi visibility rules ā€“ Supports and enforces modular characteristics from design through to execution Plus in RAD: Comprehensive support for Web and JPA. These tools can continue to be used as-is in OSGi projects, including: ā€“ New wizards (Servlet, JSP, etc.) ā€“ Page designer and other web editors ā€“ Persistence.xml editor
  • 22. Details ID: Class: 1E1 [17 bloggingServiceComponent com.ibm.ws.eba.example.blog.BloggingServiceImpl Browse... Activation: Scope: Description: 1:1 1 ilefgrepc.5gttingj 0 Method references 1Nr.Blueprint blogAuthorManager (Bean) blogCommentManager (Bean) blogEniryManager (Bean) ;FE,bloggingServiceComponent (Beal, blogAuthorManager (Property) blogCommentManager (Property. blogEntryManager (Property) com.ibm .ws.eba e xample b log . api.B commentPersistenceService (Refere persistenceManager (Reference) 1 <1 blueprint. xr721 e..Blueprint XML Editor Overview type filter text 3 [ Add... [ Remove r I Down Design Scum Community Ewen!2010 62605Gi 2129 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Development Support for Blueprint Bundles Blueprint creation wizard ā€“ Supports extension schema including JPA and transactions A blueprint editor, including: ā€“ Source page with syntax highlighting, content assist ā€“ Form-based editing similar to Java EE deployment descriptors (RAD) ā€“ Syntax and reference validation ā€“ Hyperlinking to impl classes ā€“ Refactoring support
  • 23. Community Bowl1010 62605Gi 2229 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Aries Innovation Blueprint Bean Interceptors ā€“ RFP 137 Blueprint Transactions ā€“ RFP 138 Message Driven Services ā€“ RFP 131 Subsystem Metadata and Lifecycle ā€“ RFP 121 Container-managed JPA - RFP 115 ā€“ RFP 136 (Classpath scanning) ā€“ RFP 139 (Bytecode weaving) META-INF/services RFP 128 (Blueprint annotations, no RFP yet)
  • 24. Apache AR1 ES 62605GiCarrfflnunity Bowl1010 2329 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Application exploitation of OSGi in WebSphere OSGi has been used internally in WAS since V6.1 and in Eclipse since R3. Application-level exploitation is introduced in the WebSphere Application Server V7 Feature Pack for OSGi Applications and JPA 2.0 http://www.ibm.com/websphere/was/osgi ā€“ Generally available since May 2010 ā€“ Early Program available since Nov 2009 Tools support in RAD V8: http://www.ibm.com/software/awdtools/developer/application/
  • 25. Community Ewen!2010 1 1 s I I 62605Gi 2429 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Modular Deployment Common bundles factored out of the applications and used at specific versions webA.jar WEB-INF/classes/servletA.class WEB-INF/web.xml META-INF/MANIFEST.MF webA.jar WEB-INF/classes/servletA.class WEB-INF/web.xml META-INF/MANIFEST.MF webA.jar WEB-INF/classes/servletA.class WEB-INF/web.xml META-INF/MANIFEST.MF webA.jar WEB-INF/classes/servletA.class WEB-INF/web.xml META-INF/MANIFEST.MF webA.jar WEB-INF/classes/servletA.class WEB-INF/web.xml META-INF/MANIFEST.MF webA.jar WEB-INF/classes/servletA.class WEB-INF/web.xml META-INF/MANIFEST.MF Bundle Repository Bundle Repository Import-Package webA.jar WEB-INF/classes/servletA.class WEB-INF/web.xml META-INF/MANIFEST.MF webA.jar WEB-INF/classes/servletA.class WEB-INF/web.xml META-INF/MANIFEST.MF webA.war WEB-INF/classes/servletA.class WEB-INF/web.xml WEB-INF/lib/ā€¦ webA.war WEB-INF/classes/servletA.class WEB-INF/web.xml WEB-INF/lib/ā€¦ logging f/w jar persistence f/w jar MVC f/w jar DI f/w jar webA.war WEB-INF/classes/servletA.class WEB-INF/web.xml WEB-INF/lib/ā€¦ webA.war WEB-INF/classes/servletA.class WEB-INF/web.xml WEB-INF/lib/ā€¦ logging f/w jar persistence f/w jar MVC f/w jar DI f/w jar webA.war WEB-INF/classes/servletA.class WEB-INF/web.xml WEB-INF/lib/ā€¦ webA.war WEB-INF/classes/servletA.class WEB-INF/web.xml WEB-INF/lib/ā€¦ logging f/w jar persistence f/w jar MVC f/w jar DI f/w jar webA.war WEB-INF/classes/servletA.class WEB-INF/web.xml WEB-INF/lib/ā€¦ webA.war WEB-INF/classes/servletA.class WEB-INF/web.xml WEB-INF/lib/ā€¦ logging f/w jar persistence f/w jar MVC f/w jar DI f/w jar logging f/w jar persistence f/w jar MVC f/w jar DI f/w jar ā€¢ Manage multiple versions of libraries across an enterprise ā€¢ Isolate application dependencies from the server runtime ā€¢ Centralized location to deliver critical fixes ā€¢ Flexibility to update to new versions one app at a time
  • 26. IDTroubleshooting ['Service integration I=1 UDDI 62605GiCommunity Ewing2010 Integrated Solutions Console Welcome Help ILogout Cell=irobinsNodeOlCell, Profile=AppSni01 View: IAll tasks Close page s Welcome E l Guided Activities E+ Servers ['Applications I=1 Services E l Resources E+ Security El Environment Internal bundle repository Internal bundle repository> comibmjson.java The internal bundle repository is used to store bundles that are referenced by OSGi applications running in WebSphere Application Server. When an OSGi application is imported as an assetr the provisioner attempts to satisfy all its dependencies by using the contents of the asset, the contents of the internal bundle repository, and the contents of any available external bundle repositories. Configuration Exported packages com.ibm.json.javawersion=ā€œ1.0.0" Virtual hosts Update global Web server plu configuration s WebSphere variables s Shared libraries s Replication domains E Naming OSGi bundle repositories s s Internal bundle repository E System a MFIIT3Dam.rri ID Users and Groups I=1 Monitoring and Tuning, General Properties Bundle symbolic name CO.T. Ibm.json jays Bundle version 1.0.0 Bundle name JSCIN4J Bundle description Imported packages 2529 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Modular Deployment in WAS
  • 27. ___------- ___----- _ ā€” - bundle 6 Bundle C Bundle __------- d'uOSGi Even,1010 2629 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Details: Isolated and Shared Bundles In Java EE, modules are isolated within an application and applications are isolated from one another. ā€“ Makes sharing modules difficult OSGi 4.2 all bundles have shared visibility to the externals of all others bundles within an OSGi framework (JVM) ā€“ Makes isolating applications difficult Java EE App Server Everything isolated Everything shared EAR 1 Module A Module B Module C EAR 2 Module A Module G Module C OSGi v4.2 Framework Isolation Sharing
  • 28. J 62605GiCommunity Bowl1010 2729 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Details: Isolated and Shared Bundles Equinox 3.5 ā€œnested frameworkā€ support enables ā€œcomposite bundlesā€ to run in isolated child frameworks ā€“ WebSphere installs each OSGi Application into an isolated child framework. ā€“ Shared bundles are installed into the (single) parent framework. Everything isolated Everything shared OSGi v4.2 Framework Java EE App Server EAR 1 Module A Module B Module C EAR 2 Module A Module B Module C Java EE App Server EAR 1 Module A Module B Module C EAR 1 Module A Module B Module C EAR 2 Module A Module B Module C EAR 2 Module A Module B Module C WAS V7 OSGi App FeP EBA 1 Bundle A Bundle B Bundle C EBA 2 Bundle A Bundle G Isolated framework Isolated framework Shared framework
  • 29. tt.own.ibm.ws.eba.example.bloghapp Manifest-Version: 1.0 Application-ManifestVersion: 2.0 Application-Name: Aries Blog Application-SymbolicName: com.ibm.ws.eba.example.blog.app Application-Version: 1.0 44 Application-Content: com.ibm.ws.eba.example.blog.apivrtersion=1.0.0, com.ibm.ws.eba.example.blog.persistence:7ersion=1.0.0, com.ibm.ws.eba.example.blog.webvriersior=1.0.0, com.ibm.ws.eba.example.blog:version=2.0.0 Use-Bundle: com.ibm.json.java;version=1.0.0 i<1 OverviewAPPLICATION.MF r 0 -0- O 62605GiCommunity Bowl1010 2829 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Example ā€œBlogā€ Application Blogging Service Blog Persistence Service blog-servlet Web application bundle META-INF/ persistence.xml WEB-INF/ web.xml OSGI-INF/blueprint/ blueprint.xml OSGI-INF/blueprint/ blueprint.xml JNDI EM blog.eba blog blog-persistence blog-api isolated content shared content
  • 30. ID 0 1 1 wsadmin>list() Framework Version Node Server SharedBundles 7.0.0 irobinsNode01 serverl com.ibm.ws.eba.example.blog.app 1.0.0 irobinsNode01 serverl wsaā€¢min connec u CWSAJ0035I: Connecting to framework SharedBundles_7.0.0 on node irobinsNode01 an cprvpr qprup.r1 401WSAJ0036I: Successfully connected to framework SharedBundles_7.0.0. wsadmin>ss() ID State Bundle 0 ACTIVE org.eclipse.osgi_3.5.2.R35x_v20100126 1 ACTIVE shared.bundle.framework_0.0.0 2 ACTIVE com.ibm.json.java_1.0.0 ACTIVE com.ibm.ws.eba.example.blog.app_1.0.0 ./ wsadmin>connect(1) CWSAJ0035I: Connecting to framework com.ibm.ws.eba.example.blog.app_1.0.0 on e innhinANnHt.01 And Apbrypq- Ap.mit.r1 ASAJ0036I: Successfully connected to framework com.ibm.ws.eba.example.blog.ap 1.0.0. wsadmin>ss() ID State Bundle 0 ACTIVE org.eclipse.osgi_3.5.2.R35x_v20100126 1 ACTIVE com.ibm.ws.eba.example.blog.app_1.0.0 2 ACTIVE com.ibm.ws.eba.example.blog_1.0.0 3 ACTIVE com.ibm.ws.eba.example.blog.web_1.0.0 4 ACTIVE com.ibm.ws.eba.example.blog.persistence_1.0.0 Indmin> ACTIVE com.ibm.ws.eba.example.blog.api_1.0.0 2929 Sep 2010 Ian Robinson (c) IBM Corp, 2010 JMX and Isolated Frameworks in Action
  • 31. 12' 05G.Community Bowl1010 3029 Sep 2010 Ian Robinson (c) IBM Corp, 2010 OSGi Application BundleBundle Bundle POJO POJOs assembled using a Blueprint context and scoped by an OSGi Bundle. OSGi Bundles assembled in an OSGi Application and integrated through services in the OSGi service registry SCA Composite assembled from heterogeneous components including an OSGi Application component, and integrated through SCA services with configurable bindings (JMS, web servicesā€¦). POJO POJO OSGi Applications and SCA: the assembly food chain SCA Composite Component EARPOJO
  • 32. 62605GiCommunity Bowl1010 3129 Sep 2010 Ian Robinson (c) IBM Corp, 2010 Summary Java EE and OSGi are good for each other. ā€“ Java EE defines standard enterprise technologies with contracts for applications and runtimes ā€“ OSGi encourages and enforces modular design and enables modular deployment The Apache Aries project delivers enterprise OSGi technologies that have been integrated into a number of runtimes. ā€“ As well as experimental implementation of new EEG RFPs to inform the specs. WAS V7 and RAD integration of Aries provides complete develop-test-deploy-manage environment for modular enterprise applications.
  • 33. 62605GiCommunity Bowl1010 3229 Sep 2010 Ian Robinson (c) IBM Corp, 2010 References Apache Aries http://incubator.apache.org/aries/ Apache Geronimo v3.0-M1: http://geronimo.apache.org/ WAS V7 Feature Pack for OSGi Applications and JPA 2.0 http://www.ibm.com/websphere/was/osgi OSGi Application Development Plugin: http://marketplace.eclipse.org/content/ibm-rational- development-tools-osgi-applications Rational Application Developer V8: http://www.ibm.com/software/awdtools/developer/application/