osgi and the enterprise a match made in a box? · pdf fileseptember 23rd 2010 11 java vm log4j...

34
OSGi and the Enterprise A match made in a ... box? Holly Cummins [email protected] JUG Stuttgart Sept 23, 2010

Upload: dangtu

Post on 11-Mar-2018

218 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

OOOOOOSSSSSSGGGGGGiiiiii aaaaaannnnnndddddd tttttthhhhhheeeeee EEEEEEnnnnnntttttteeeeeerrrrrrpppppprrrrrriiiiiisssssseeeeeeAAAAAA mmmmmmaaaaaattttttcccccchhhhhh mmmmmmaaaaaaddddddeeeeee iiiiiinnnnnn aaaaaa .................. bbbbbbooooooxxxxxx??????

Holly [email protected] StuttgartSept 23, 2010

Page 2: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

2September 23rd 2010

AAAAAA ((((((vvvvvveeeeeerrrrrryyyyyy)))))) bbbbbbrrrrrriiiiiieeeeeeffffff hhhhhhiiiiiissssssttttttoooooorrrrrryyyyyy ooooooffffff pppppprrrrrrooooooggggggrrrrrraaaaaammmmmmmmmmmmiiiiiinnnnnnggggggIn the beginning, there were bits ...

0101011101001001010010010011011101101101101

Page 3: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

3September 23rd 2010

AAAAAA ((((((vvvvvveeeeeerrrrrryyyyyy)))))) bbbbbbrrrrrriiiiiieeeeeeffffff hhhhhhiiiiiissssssttttttoooooorrrrrryyyyyy ooooooffffff pppppprrrrrrooooooggggggrrrrrraaaaaammmmmmmmmmmmiiiiiinnnnnnggggggThen came words ...

mov ah,9mov dx,offset hello_messageint 21h

Page 4: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

4September 23rd 2010

AAAAAA ((((((vvvvvveeeeeerrrrrryyyyyy)))))) bbbbbbrrrrrriiiiiieeeeeeffffff hhhhhhiiiiiissssssttttttoooooorrrrrryyyyyy ooooooffffff pppppprrrrrrooooooggggggrrrrrraaaaaammmmmmmmmmmmiiiiiinnnnnngggggg... functions and libraries ...

#include <stdio.h>main() {

printf ("Hello World!\n");}

Page 5: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

5September 23rd 2010

AAAAAA ((((((vvvvvveeeeeerrrrrryyyyyy)))))) bbbbbbrrrrrriiiiiieeeeeeffffff hhhhhhiiiiiissssssttttttoooooorrrrrryyyyyy ooooooffffff pppppprrrrrrooooooggggggrrrrrraaaaaammmmmmmmmmmmiiiiiinnnnnngggggg... objects ...

public class HelloWorldSayer {

public void sayHello() { System.out.println("Hello, world!\n"); }}

Page 6: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

6September 23rd 2010

AAAAAA ((((((vvvvvveeeeeerrrrrryyyyyy)))))) bbbbbbrrrrrriiiiiieeeeeeffffff hhhhhhiiiiiissssssttttttoooooorrrrrryyyyyy ooooooffffff pppppprrrrrrooooooggggggrrrrrraaaaaammmmmmmmmmmmiiiiiinnnnnngggggg... and now - Enterprise OSGi

<service ref="helloservice" interface="helloworld.HelloWorldService" />

public class HelloWorldClient {HelloWorldService service =

null;public void startUp() {

service.hello();}

}

Page 7: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

7September 23rd 2010

WWWWWWhhhhhhaaaaaatttttt wwwwwwaaaaaassssss wwwwwwrrrrrroooooonnnnnngggggg wwwwwwiiiiiitttttthhhhhh wwwwwwhhhhhheeeeeerrrrrreeeeee wwwwwweeeeee wwwwwweeeeeerrrrrreeeeee??????A question of scale

Page 8: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

8September 23rd 2010

IDL JDBC JNDI JAXP JAAS JMX RMI-IIOP

EEEEEEnnnnnntttttteeeeeerrrrrrprprprprprpriiiiiisssssseeeeee AAAAAAPIsPIsPIsPIsPIsPIs iiiiiinnnnnn JaJaJaJaJaJavvvvvvaaaaaa (R(R(R(R(R(Reeeeeeqqqqqquuuuuuiiiiiirrrrrreeeeeedddddd f f f f f foooooorrrrrr JaJaJaJaJaJavvvvvvaaaaaa EEEEEEEEEEEE))))))

Servlet JSP

WWWWWWeeeeeeb b b b b b CCCCCCoooooonnnnnnttttttaaaaaaiiiiiinnnnnneeeeeerrrrrr

Java

Mail

JA

F

JAX-

RPC

JAX-

WS

Web

Ser

vices

WS

Met

adat

a

JMS

JTA

JACC

JAXR

Man

agem

ent

JPA

EJB

SAAJ

HTTP

/SSL

Direct dependency

Optional dependencies

JSTL JSF

JAXB

JCA

Deb

ug

Com

mon

An

nota

tions

JaJaJaJaJaJavvvvvvaaaaaa EEEEEEEEEEEE WWWWWWeeeeeeb b b b b b tttttteeeeeecccccchhhhhhnnnnnnolololololologogogogogogiiiiiieeeeeessssss

StAX

Indirect (soft) dependencyJA

X-RS

JASP

IC

CDI &

DI

Page 9: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

9September 23rd 2010

IDL JDBC JNDI JAXP JAAS JMX RMI-IIOP

EEEEEEnnnnnntttttteeeeeerrrrrrpppppprrrrrriiiiiisssssseeeeee A A A A A APPPPPPIIIIIIssssss iiiiiinnnnnn JJJJJJaaaaaavvvvvvaaaaaa SSSSSSEEEEEE ((((((RRRRRReeeeeeqqqqqquuuuuuiiiiiirrrrrreeeeeedddddd ffffffoooooorrrrrr JJJJJJaaaaaavvvvvvaaaaaa EEEEEEEEEEEE))))))

Servlet JSP WWWWWWeeeeeebbbbbb CCCCCCoooooonnnnnnttttttaaaaaaiiiiiinnnnnneeeeeerrrrrr

Java

Mai

l JA

F

JAX-

RPC

JAX-

WS

Web

Se

rvic

es

WS

Met

adat

a JMS

JTA

JACC

JAXR

Man

age

men

t

JPA

EJB

SAAJ

HTT

P/SS

L

Direct dependencyOptional dependencies

JSTL JSF

JAXB

JCA

Debu gCom

mon

An

nota

tion

s

JJJJJJaaaaaavvvvvvaaaaaa EEEEEEEEEEEE WWWWWWeeeeeebbbbbb tttttteeeeeechchchchchchnnnnnnoooooollllllooooooggggggiiiiiieeeeeessssss

StAX

Indirect (soft) dependencyJA

X-RS

JASP

IC

CDI &

DI

((((((ccccccaaaaaappppppaaaaaabbbbbbiiiiiilllllliiiiiittttttyyyyyy ============ bbbbbbllllllooooooaaaaaatttttt))))))??????

HTTP Session Replication Connection Management Persistence Providers User Registries Event Mgmt

Logging and Tracing MBean Server Admin Consoleand scripting

DataSources Messaging Engines Security

Transport Channels Workload Management HTTP Servingand routing

High AvailabilityManagement

Transaction Loggingand Recovery

Thread management Classloading Provisioning Monitoring Policy and SLAmgmt Configuration

………………

Page 10: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

10September 23rd 2010

I DL J DBC J NDI J AX P J A AS J MX RMI - I I OP

EEEEEEnnnnnntttttteeeeeerrrrrrprprprprprpriiiiiisesesesesese AAAAAAPPPPPPIIIIIIs s s s s s inininininin JJJJJJaaaaaavvvvvvaaaaaa SSSSSSEEEEEE ((((((RRRRRReeeeeeqqqqqquuuuuuiiiiiirerererereredddddd ffffffor or or or or or JJJJJJaaaaaavvvvvvaaaaaa EEEEEEEEEEEE))))))

S e r vl e t J S P

WWWWWWeeeeeeb b b b b b CCCCCCononononononttttttaaaaaainininininineeeeeerrrrrr

Ja

vaM

ai

l

JA

F

JA

X-

RP

C

JA

X-

WS

Web

Se

rvi

ce

s

WS

Me

ta

da

ta

JM

S

JT

A

JA

CC

JA

XR

Ma

na

ge

me

nt

JP

A

EJ

B

SA

AJ

HT

TP

/SS

L

D i r e c t de pe n de n c y

Op t i on a l de pe n d e n c i e s

JS

TL

JS

F

JA

XB

JC

A

De

bu

g

Co

mm

on

An

no

ta

ti

on

s

JJJJJJaaaaaavvvvvvaaaaaa EEEEEEEEEEEE WWWWWWeeeeeebbbbbb tttttteeeeeecccccchhhhhhnnnnnnolololololologogogogogogiiiiiieeeeeessssss

St

AX

I n d i r e c t ( s o f t ) d e pe n de n c y

JA

X-

RS

JA

SP

IC

CD

I &

DI

BBBBBBeeeeeeyyyyyyoooooonnnnnndddddd JJJJJJaaaaaavvvvvvaaaaaa EEEEEEEEEEEE………………

HTTP Session Replication Connection Management Persistence Providers User Registries Event Mgmt

Logging and Tracing MBean Server Admin Consoleand scripting

DataSources Messaging Engines Security

Transport Channels Workload Management HTTP Servingand routing

High AvailabilityManagement

Transaction Loggingand Recovery

Thread management Classloading Provisioning Monitoring Policy and SLAmgmt Configuration

………………

Batch Telephony BPM DynamicScripting

SCA BusinessRules

Complex EventProcessing

………………

Page 11: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

11September 23rd 2010

JJJJJJaaaaaavvvvvvaaaaaa VVVVVVMMMMMM

lllllloooooogggggg444444jjjjjj

bbbbbbaaaaaarrrrrrccccccooooooddddddeeeeee444444jjjjjj

aaaaaaxxxxxxiiiiiissssss

bbbbbbaaaaaattttttiiiiiikkkkkk

ccccccoooooommmmmmmmmmmmoooooonnnnnnssssss

ddddddeeeeeerrrrrrbbbbbbyyyyyy

ffffffoooooopppppp

eeeeeezzzzzzmmmmmmoooooorrrrrrpppppphhhhhh

ffffffrrrrrreeeeeeeeeeeemmmmmmaaaaaarrrrrrkkkkkkeeeeeerrrrrr

hhhhhhttttttttttttppppppuuuuuunnnnnniiiiiitttttt

jjjjjjaaaaaakkkkkkaaaaaarrrrrrttttttaaaaaa

jjjjjjccccccllllll

jjjjjjssssssoooooonnnnnn

jjjjjjddddddbbbbbbmmmmmm

jjjjjjddddddoooooommmmmm

jjjjjjeeeeeennnnnnkkkkkkssssss

jjjjjjppppppoooooossssss111111888888

jjjjjjyyyyyytttttthhhhhhoooooonnnnnn

llllllooooooooooookkkkkkssssss

lllllluuuuuucccccceeeeeennnnnneeeeee

mmmmmmaaaaaaiiiiiillllll

mmmmmmxxxxxx444444jjjjjj

nnnnnnaaaaaammmmmmiiiiiinnnnnngggggg

jjjjjjeeeeeettttttttttttyyyyyy

ppppppooooooiiiiii

rrrrrreeeeeessssssoooooollllllvvvvvveeeeeerrrrrr

rrrrrroooooommmmmmeeeeee

sssssseeeeeerrrrrriiiiiiaaaaaalllllliiiiiizzzzzzeeeeeerrrrrr

sssssseeeeeerrrrrrvvvvvvlllllleeeeeettttttssssss

ttttttoooooommmmmmccccccaaaaaatttttt

vvvvvveeeeeelllllloooooocccccciiiiiittttttyyyyyy

wwwwwwssssss------ccccccoooooommmmmmmmmmmmoooooonnnnnnssssss

xxxxxxaaaaaallllllaaaaaannnnnn

wwwwwwssssssddddddllllll444444jjjjjj

xxxxxxeeeeeerrrrrrcccccceeeeeessssss

xxxxxxmmmmmmllllllggggggrrrrrraaaaaapppppphhhhhhiiiiiiccccccssssss

xxxxxxmmmmmmllllllrrrrrrppppppcccccc

xxxxxxmmmmmmllllllaaaaaappppppiiiiiissssss

............

ggggggeeeeeerrrrrroooooonnnnnniiiiiimmmmmmoooooo

bbbbbbsssssshhhhhh

bbbbbbssssssffffff

gggggguuuuuuiiiiiiaaaaaapppppppppppp

hhhhhhhhhhhhffffffaaaaaacccccciiiiiilllllliiiiiittttttyyyyyy

mmmmmmaaaaaannnnnnuuuuuuffffffaaaaaacccccctttttt......

mmmmmmaaaaaarrrrrrkkkkkkeeeeeettttttiiiiiinnnnnngggggg

mmmmmmiiiiiinnnnnneeeeeerrrrrrvvvvvvaaaaaa

aaaaaaccccccccccccoooooouuuuuunnnnnnttttttiiiiiinnnnnngggggg

aaaaaasssssssssssseeeeeettttttmmmmmmaaaaaaiiiiiinnnnnntttttt

bbbbbbaaaaaasssssseeeeee

bbbbbbiiiiii

ccccccaaaaaattttttaaaaaalllllliiiiiinnnnnnaaaaaa

ccccccoooooommmmmmmmmmmmoooooonnnnnn

ooooooaaaaaaggggggiiiiiissssss

oooooorrrrrrddddddeeeeeerrrrrr

eeeeeebbbbbbaaaaaayyyyyy

ccccccoooooonnnnnntttttteeeeeennnnnntttttt

ddddddaaaaaattttttaaaaaaffffffiiiiiilllllleeeeee

eeeeeeccccccoooooommmmmmmmmmmmeeeeeerrrrrrcccccceeeeee

eeeeeennnnnnttttttiiiiiittttttyyyyyy

ggggggoooooooooooogggggglllllleeeeeebbbbbbaaaaaasssssseeeeee

ooooooffffffbbbbbbiiiiiizzzzzz

wwwwwwiiiiiiddddddggggggeeeeeetttttt

mmmmmmiiiiiinnnnnniiiiiillllllaaaaaannnnnngggggg

ppppppaaaaaarrrrrrttttttyyyyyy

ppppppoooooossssss......

pppppprrrrrroooooodddddduuuuuucccccctttttt

wwwwwwoooooorrrrrrkkkkkkeeeeeeffffffffffffoooooorrrrrrtttttt

wwwwwwoooooorrrrrrkkkkkkfffffflllllloooooowwwwww

………………

ssssssuuuuuunnnnnnjjjjjjcccccceeeeee______pppppprrrrrroooooovvvvvv......

pppppplllllluuuuuuggggggiiiiiinnnnnn

jjjjjjsssssssssssseeeeee

jjjjjjcccccceeeeee

rrrrrrtttttt

ddddddnnnnnnssssssnnnnnnssssss

............

………………CCCCCCllllllaaaaaassssssssssssNNNNNNooooootttttt

FFFFFFoooooouuuuuunnnnnnddddddEEEEEExxxxxxcccccceeeeeeppppppttttttiiiiiioooooonnnnnn

BBBBBBeeeeeeggggggiiiiiinnnnnnBBBBBBeeeeeeggggggiiiiiinnnnnnHHHHHHeeeeeerrrrrreeeeeeHHHHHHeeeeeerrrrrreeeeee

TTTTTThhhhhheeeeee GGGGGGlllllloooooobbbbbbaaaaaallllll CCCCCCllllllaaaaaassssssssssssppppppaaaaaatttttthhhhhh

Page 12: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

12September 23rd 2010

OOOOOOSSSSSSGGGGGGiiiiii ttttttoooooo tttttthhhhhheeeeee rrrrrreeeeeessssssccccccuuuuuueeeeee!!!!!!

• OSGi is almost essential in this kind of situation

Page 13: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

13September 23rd 2010

OOOOOOSSSSSSGGGGGGiiiiii BBBBBBuuuuuunnnnnnddddddlelelelelelessssss aaaaaarrrrrreeeeee ddddddiiiiiiffffffffffffeeeeeerrrrrreeeeeennnnnntttttt

• A Bundle is a special jar• Each bundle has a classloader• Bundles define

• required packages• provided packages

• Packages can be versioned

Bundle

Page 14: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

14September 23rd 2010

TTTTTThhhhhheeeeee NaNaNaNaNaNarrrrrrrrrrrroooooowwwwww CCCCCCllllllaaaaaassssssssssssppppppaaaaaatttttthhhhhh

• Bundles wired together• Following a wire is quick• If an endpoint isn't there you

know about it!

DDDDDDeeeeeeccccccllllllaaaaaarrrrrreeeeeedddddd ppppppaaaaaacccccckkkkkkagagagagagageeeeee

rrrrrreeeeeeqqqqqquuuuuuiiiiiirrrrrreeeeeemmmmmmeeeeeennnnnntttttt

Useful library B

Useful library A

De c lar e d pac k ag e r e q u ir e m e n t

DDDDDDeeeeeeccccccllllllarearearearearearedddddd ppppppacacacacacackkkkkkaaaaaaggggggeeeeee

rererererereqqqqqquuuuuuiiiiiirrrrrreeeeeemmmmmmeeeeeennnnnntttttt

Ourjar

Page 15: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

15September 23rd 2010

MMMMMMoooooorrrrrreeeeee ttttttrrrrrroooooouuuuuubbbbbblllllleeeeee wwwwwwiiiiiitttttthhhhhh lllllliiiiiibbbbbbrrrrrraaaaaarrrrrriiiiiieeeeeessssss

web app

Useful library A

Useful library B

common library v1

common library v2

Page 16: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

16September 23rd 2010

AAAAAAnnnnnndddddd aaaaaatttttt rrrrrruuuuuunnnnnnttttttiiiiiimmmmmmeeeeee ..................

web app

Useful library A

Useful library B

common library v1

common library v2

Page 17: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

17September 23rd 2010

OOOOOOSSSSSSGGGGGGiiiiii mmmmmmaaaaaakkkkkkeeeeeessssss rrrrrruuuuuunnnnnnttttttiiiiiimmmmmmeeeeee wwwwwwoooooorrrrrrkkkkkk lllllliiiiiikkkkkkeeeeee tttttthhhhhheeeeee bbbbbbuuuuuuiiiiiilllllldddddd ((((((kkkkkkiiiiiinnnnnndddddd ooooooffffff))))))

web app

Useful library B

common library v1

common library v2

Useful library A

Page 18: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

18September 23rd 2010

EEEEEEAAAAAARRRRRRssssss aaaaaannnnnndddddd cccccclalalalalalassssssssssssppppppaaaaaatttttthhhhhhssssss• Run multiple apps on a server• Common libraries in each war

wwwwwweeeeeebbbbbbAAAAAA......wwwwwwaaaaaarrrrrrWEB-INF/classes/servletA.classWEB-INF/lib/a.jarWEB-INF/lib/b.jarWEB-INF/lib/junit.jar…

wwwwwweeeeeebbbbbbBBBBBB......wwwwwwaaaaaarrrrrrWEB-INF/classes/servletB.classWEB-INF/lib/a.jarWEB-INF/lib/b.jarWEB-INF/lib/junit.jar…

wwwwwweeeeeebbbbbbC.C.C.C.C.C.wwwwwwaaaaaarrrrrrWEB-INF/classes/servletC.classWEB-INF/lib/a.jarWEB-INF/lib/b.jarWEB-INF/lib/c.jar…

Page 19: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

19September 23rd 2010

EEEEEEAAAAAARRRRRRssssss aaaaaannnnnndddddd cccccclalalalalalassssssssssssppppppaaaaaatttttthhhhhhssssss .................. wwwwwwiiiiiitttttthhhhhh OOOOOOSSSSSSGGGGGGiiiiii• Shared libraries provisioned

wwwwwweeeeeebbbbbbAAAAAA......wwwwwwaaaaaarrrrrrWEB-INF/classes/servletA.class

wwwwwweeeeeebbbbbbBBBBBB......wwwwwwaaaaaarrrrrrWEB-INF/classes/servletB.class

wwwwwweeeeeebbbbbbC.C.C.C.C.C.wwwwwwaaaaaarrrrrrWEB-INF/classes/servletC.class

Page 20: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

20September 23rd 2010

LLLLLLoooooooooooosssssseeeeee ccccccoooooouuuuuupppppplllllliiiiiinnnnnngggggg

• Modern enterprise architectures are all loosely coupled• In some way or another!

• JNDI• Web services• Dependency injection• OSGi services

Page 21: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

21September 23rd 2010

OOOOOOSSSSSSGGGGGGiiiiii SSSSSSeeeeeerrrrrrvvvvvviiiiiicccccceeeeeessssss

• Services registered in Service Registry. • Services are dynamic

S

Page 22: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

22September 23rd 2010

BBBBBBuuuuuutttttt ..................

• Historically OSGi and JEE have not played well together• Had to choose one and stick to it

Page 23: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

23September 23rd 2010

OOOOOOSSSSSSGGGGGGiiiiii EEEEEEnnnnnntttttteeeeeerrrrrrpppppprrrrrriiiiiisssssseeeeee SSSSSSppppppeeeeeecccccciiiiiiffffffiiiiiiccccccaaaaaattttttiiiiiioooooonnnnnn

• Release date – 22 March 2010• The product of the OSGi Enterprise Expert Group (EEG)

• Brings popular Java EE technologies and OSGi together• Web Apps - Servlets + OSGi• JPA

• Adds Spring-derived component model and DI container• Blueprint

Page 24: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

24September 23rd 2010

WWWWWWhhhhhhaaaaaatttttt ddddddooooooeeeeeessssss eeeeeennnnnntttttteeeeeerrrrrrpppppprrrrrriiiiiisssssseeeeee OOOOOOSSSSSSGGGGGGiiiiii ggggggiiiiiivvvvvveeeeee yyyyyyoooooouuuuuu??????

• Integrations for • Dependency injection (“blueprint”)• Dependency injection of OSGi services• JPA• JTA• JMX• JNDI

• Open source extensions include ...• Container-managed transactions• Application assembly• Application deployment

Page 25: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

September 23rd 2010

BBBBBBlllllluuuuuueeeeeepppppprrrrrriiiiiinnnnnntttttt

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>

Page 26: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

26September 23rd 2010

OOOOOOppppppeeeeeennnnnn SSSSSSoooooouuuuuurrrrrrcccccceeeeee AAAAAAccccccttttttiiiiiivvvvvviiiiiittttttiiiiiieeeeeessssssApache “Aries” Projecthttp://incubator.apache.org/aries/• Implementations and extensions of Enterprise OSGi

specifications• Just completed 2nd release. • Project was 1 year old last week!

Eclipse “Gemini” Enterprise Modules Projecthttp://www.eclipse.org/gemini/• Modular implementations of Enterprise OSGi

specifications

Page 27: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

27September 23rd 2010

OOOOOOSSSSSSGGGGGGiiiiii AAAAAApppppppppppplllllliiiiiiccccccaaaaaattttttiiiiiioooooonnnnnn TTTTTToooooooooooolslslslslsls

Page 28: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

28September 23rd 2010

DDDDDDeeeeeemmmmmmoooooo

Page 29: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

29September 23rd 2010

OOOOOOnnnnnn lllllluuuuuucccccckkkkkk ..................

“I'm a great believer in luck and I find the harder I work, the more I have of it.”

■ Thomas Jefferson

Page 30: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

30September 23rd 2010

DDDDDDeeeeeemmmmmmoooooo((((((mmmmmmaaaaaayyyyyybbbbbbeeeeee))))))

Page 31: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

31September 23rd 2010

DDDDDDeeeeeemmmmmmoooooo((((((mmmmmmaaaaaayyyyyybbbbbbeeeeee))))))

Page 32: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

32September 23rd 2010

Page 33: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

33September 23rd 2010

In the near future…all major Java

enterprise runtimes will support Apps

deployed as bundles

Page 34: OSGi and the Enterprise A match made in a box? · PDF fileSeptember 23rd 2010 11 Java VM log4j barcode4j axis batik commons derby fop ezmorph freemarker httpunit jakarta jcl json jdbm

34September 23rd 2010

FFFFFFoooooorrrrrr ffffffuuuuuurrrrrrtttttthhhhhheeeeeerrrrrr iiiiiinnnnnnffffffoooooorrrrrrmmmmmmaaaaaattttttiiiiiioooooonnnnnn vvvvvviiiiiissssssiiiiiitttttt::::::iiiiiibbbbbbmmmmmm......ccccccoooooommmmmm/W/W/W/W/W/WeeeeeebbbbbbSSSSSSpppppphhhhhheeeeeerrrrrreeeeee//////ddddddeeeeeevvvvvv