Developing modular applications with Java EE 6 and Enterprise OSGi + WebSphere V8.5 Liberty Profile

Post on 14-May-2015

890 views 4 download

Tags:

Transcript of Developing modular applications with Java EE 6 and Enterprise OSGi + WebSphere V8.5 Liberty Profile

Developing modular applications with Java EE 6 and

Enterprise OSGi...and WebSphere V8.5 Liberty Profile

Jacek Laskowski

wersja 1.0, Riga, Latvia, 29.11.2012

jacek@japila.pl

@JacekLaskowski

About me• Java EE, OSGi and functional programming (Clojure, F# and Scala)

enthusiast

• Founder and leader of Warszawa Java User Group

• Javarsovia, Confitura, warsjawa conference team member

• Blogger of http://JacekLaskowski.pl

• Blogger of http://blog.japila.pl

• @JacekLaskowski

• Member of Apache Software Foundation

• Apache OpenEJB and TomEE committer

• Member of IBM Academy of Technology

• IBMer in World-wide WebSphere Competitive Migration Team

OSGi Blueprint

@JacekLaskowski

• Chapter 121• Blueprint Container

Specification Version 1.0

@JacekLaskowski

OSGi Blueprint defines a dependency injection framework, specifically for OSGi bundles,

that understands the unique dynamic nature of services.

Bundles in this programming model contain a number of XML definition resources which are used by the Blueprint

Container to wire the application together and start it when the bundle is active.

OSGi Service Platform Release 4, Version 4.2 page 193

OSGi Blueprint

@JacekLaskowski

OSGi Blueprint• Dependency injection framework for OSGi bundles

@JacekLaskowski

OSGi Blueprint• Dependency injection framework for OSGi bundles

• Programming model

@JacekLaskowski

OSGi Blueprint• Dependency injection framework for OSGi bundles

• Programming model

• XML to define constituents

@JacekLaskowski

OSGi Blueprint• Dependency injection framework for OSGi bundles

• Programming model

• XML to define constituents

• Enterprise OSGi == OSGi Blueprint

@JacekLaskowski

OSGi Blueprint• Dependency injection framework for OSGi bundles

• Programming model

• XML to define constituents

• Enterprise OSGi == OSGi Blueprint

• For this presentation only

@JacekLaskowski

Blueprint bundle

@JacekLaskowski

A bundle is a Blueprint bundle ifit contains one or more blueprint XML definition

resourcesin the OSGI-INF/blueprint directory or

it contains the Bundle-Blueprint manifest header referring to existing resources.

Problems (to be?) solved

@JacekLaskowski

Problems (to be?) solved

@JacekLaskowski

How can you know the type exists?

(visibility)

Problems (to be?) solved

@JacekLaskowski

How can you know the type exists?

(visibility)

What about the available methods?

(versioning)

Problems (to be?) solved

@JacekLaskowski

How can you know the type exists?

(visibility) How are the parts

integrated?What

about the available methods?

(versioning)

@JacekLaskowski

@JacekLaskowski

Demo Time

Open questions

@JacekLaskowski

Open questions• Difference between Maven and OSGi Blueprint

@JacekLaskowski

Open questions• Difference between Maven and OSGi Blueprint

• build-time vs runtime

@JacekLaskowski

Open questions• Difference between Maven and OSGi Blueprint

• build-time vs runtime

• Maven brings the libs to the app and bundles them

@JacekLaskowski

Open questions• Difference between Maven and OSGi Blueprint

• build-time vs runtime

• Maven brings the libs to the app and bundles them

• Do you need to include the libs inside the app if they’re available at runtime?

@JacekLaskowski

Thanks for listeningQuestions?

@JacekLaskowskihttp://blog.japila.pl