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

23
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 [email protected] @JacekLaskowski

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

Page 1: 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

[email protected]

@JacekLaskowski

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

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

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

OSGi Blueprint

@JacekLaskowski

• Chapter 121• Blueprint Container

Specification Version 1.0

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

@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

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

OSGi Blueprint

@JacekLaskowski

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

OSGi Blueprint• Dependency injection framework for OSGi bundles

@JacekLaskowski

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

OSGi Blueprint• Dependency injection framework for OSGi bundles

• Programming model

@JacekLaskowski

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

OSGi Blueprint• Dependency injection framework for OSGi bundles

• Programming model

• XML to define constituents

@JacekLaskowski

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

OSGi Blueprint• Dependency injection framework for OSGi bundles

• Programming model

• XML to define constituents

• Enterprise OSGi == OSGi Blueprint

@JacekLaskowski

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

OSGi Blueprint• Dependency injection framework for OSGi bundles

• Programming model

• XML to define constituents

• Enterprise OSGi == OSGi Blueprint

• For this presentation only

@JacekLaskowski

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

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.

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

Problems (to be?) solved

@JacekLaskowski

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

Problems (to be?) solved

@JacekLaskowski

How can you know the type exists?

(visibility)

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

Problems (to be?) solved

@JacekLaskowski

How can you know the type exists?

(visibility)

What about the available methods?

(versioning)

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

Problems (to be?) solved

@JacekLaskowski

How can you know the type exists?

(visibility) How are the parts

integrated?What

about the available methods?

(versioning)

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

@JacekLaskowski

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

@JacekLaskowski

Demo Time

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

Open questions

@JacekLaskowski

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

Open questions• Difference between Maven and OSGi Blueprint

@JacekLaskowski

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

Open questions• Difference between Maven and OSGi Blueprint

• build-time vs runtime

@JacekLaskowski

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

Open questions• Difference between Maven and OSGi Blueprint

• build-time vs runtime

• Maven brings the libs to the app and bundles them

@JacekLaskowski

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

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

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

Thanks for listeningQuestions?

@JacekLaskowskihttp://blog.japila.pl