OSGi & JOnAS, OW2con11, Nov 24-25, Paris

15
OW2Con 2011, November 23-24, Orange Labs, Paris. www.ow2.org. Leverage OSGi Leverage OSGi TM TM in Java EE in Java EE TM TM business business applications with JOnAS applications with JOnAS Guillaume Sauthier, Bull SAS Guillaume Sauthier, Bull SAS « Demonstrates how OSGi TM can help building business applications relying on an OSGi TM Application Server »

description

 

Transcript of OSGi & JOnAS, OW2con11, Nov 24-25, Paris

Page 1: OSGi & JOnAS, OW2con11, Nov 24-25, Paris

OW2Con 2011, November 23-24, Orange Labs, Paris.

www.ow2.org.

Leverage OSGiLeverage OSGiTMTM in Java EE in Java EETMTM business business applications with JOnASapplications with JOnAS

Guillaume Sauthier, Bull SASGuillaume Sauthier, Bull SAS

« Demonstrates how OSGiTM can help building business applications relying on an OSGiTM Application Server »

Page 2: OSGi & JOnAS, OW2con11, Nov 24-25, Paris

OW2Con 2011, November 23-24, Orange Labs, Paris.

www.ow2.org.

AgendaAgenda

I. Why building OSGi applications ?

II.Why do we need Java EE ?

III.Hybrid applications

IV.Best of breed application server

Page 3: OSGi & JOnAS, OW2con11, Nov 24-25, Paris

OW2Con 2011, November 23-24, Orange Labs, Paris.

www.ow2.org.

Why building OSGi Why building OSGi applications applications ??

● Bundles are the building blocks● Installable, removable, even updatable

● At runtime, dynamically● Enables application composition (right size)● Fine control on dependencies

(package version, …)– Control what you actually use– Control what you want to expose– Avoids « classpath hell »

Page 4: OSGi & JOnAS, OW2con11, Nov 24-25, Paris

OW2Con 2011, November 23-24, Orange Labs, Paris.

www.ow2.org.

Why building OSGi applications ?Why building OSGi applications ?

● OSGi promotes a service oriented approach● Services are registered under a contract (API) in the

service registry➢ Loose coupling

● Consumers require services using their contracts● No hard dependency on a given service provider

● Services are dynamic● Can come and go at any time

Page 5: OSGi & JOnAS, OW2con11, Nov 24-25, Paris

OW2Con 2011, November 23-24, Orange Labs, Paris.

www.ow2.org.

Why building OSGi applications ?Why building OSGi applications ?

● Multiple and diverses component models helps to develop pure OSGi applications● They still are inter-operable !● Shield developers from inherent

programmation issues with services dynamism

● Make your choice after tasting :)

Page 6: OSGi & JOnAS, OW2con11, Nov 24-25, Paris

OW2Con 2011, November 23-24, Orange Labs, Paris.

www.ow2.org.

Why do we need Java EE ?Why do we need Java EE ?

● Java EE skills are widely known● Large spectrum: from presentation to data layer

– Servlet, EJB, JPA● Data integrity

– Transaction (JTA)● Inter-operability

– With REST and SOAP(JAX-RS, JAX-WS)

– RMI/IIOP too (CORBA)

Page 7: OSGi & JOnAS, OW2con11, Nov 24-25, Paris

OW2Con 2011, November 23-24, Orange Labs, Paris.

www.ow2.org.

Hybrid applications [1/2]Hybrid applications [1/2]

● Hybrid applications uses the best of the OSGi and Java EE world● Well known Java EE programming model

– Ease of development● A first glimpse at OSGi benefits

– Java EE components can use OSGiservices

– Java EE components are exposedas OSGi services (EJB)

Page 8: OSGi & JOnAS, OW2con11, Nov 24-25, Paris

OW2Con 2011, November 23-24, Orange Labs, Paris.

www.ow2.org.

Hybrid applicationsHybrid applications [2/2] [2/2]

● OSGi based applications can also benefits from Java EE components● Servlets / HttpService● Data access layer

– Connection pooling– JPA modeling– Transactions support

Page 9: OSGi & JOnAS, OW2con11, Nov 24-25, Paris

OW2Con 2011, November 23-24, Orange Labs, Paris.

www.ow2.org.

Best of breed application serverBest of breed application server [1/4] [1/4]

● JOnAS is it-self built on top of OSGi● Permits right sized execution platform definition● SOA principles applied to JOnAS technical services

maximizing testability and overall quality● Different execution profiles can be defined

– Micro : only the kernel– Full : All available services– All the in-between profiles ...

Page 10: OSGi & JOnAS, OW2con11, Nov 24-25, Paris

OW2Con 2011, November 23-24, Orange Labs, Paris.

www.ow2.org.

Best of breed application serverBest of breed application server [2/4] [2/4]

● As Java EE implementor, JOnAS is well suited to provide the OSGi enterprise specifications :● HTTP Service (Servlet)● JDBC Service (Data access)● JTA Service (Transaction)● JNDI Service (Naming)● JCA Service (Connector / Resource Adapters)● JPA Service (High level data access)

Page 11: OSGi & JOnAS, OW2con11, Nov 24-25, Paris

OW2Con 2011, November 23-24, Orange Labs, Paris.

www.ow2.org.

Best of breed application serverBest of breed application server [3/4] [3/4]

● JOnAS exposes the OSGi framework to the Java EE applications● OSGi services available to Java EE components

EJB 3 Service Implementation

OSGi BundleJava EE Module

Page 12: OSGi & JOnAS, OW2con11, Nov 24-25, Paris

OW2Con 2011, November 23-24, Orange Labs, Paris.

www.ow2.org.

Best of breed application serverBest of breed application server [4/4] [4/4]

● JOnAS exposes the OSGi framework to the Java EE applications● EJB business interfaces available to OSGi

EJB 3 Service Consumer

OSGi BundleJava EE / OSGi Module

Page 13: OSGi & JOnAS, OW2con11, Nov 24-25, Paris

OW2Con 2011, November 23-24, Orange Labs, Paris.

www.ow2.org.

ConclusionConclusion

● Java EE programming model is here to stay● Don't throw away your 'EJB in action' books !

● OSGi is gradually becoming more and more important● Apps will benefits from modularity and dynamism

Page 14: OSGi & JOnAS, OW2con11, Nov 24-25, Paris

OW2Con 2011, November 23-24, Orange Labs, Paris.

www.ow2.org.

QuestionsQuestions

??jonas.ow2.orgjonas.ow2.org

[email protected]@sauthieg

Page 15: OSGi & JOnAS, OW2con11, Nov 24-25, Paris

OW2Con 2011, November 23-24, Orange Labs, Paris.

www.ow2.org.

ThanksThanks

● http://www.flickr.com/photos/simonk/535063371

● http://www.flickr.com/photos/frank3/6053973411

● http://www.flickr.com/photos/nicokaiser/6070196415/

● http://www.flickr.com/photos/preppybyday/5084101811/

● http://www.flickr.com/photos/ludovicpoitou/5185031866

● http://www.flickr.com/photos/twak/3688809043/