SlideShare a Scribd company logo
1 of 32
Download to read offline
© 2009 IBM Corporation
CDI Integration In OSGi


Emily Jiang, WebSphere Application Server Development, CDI Lead
Emily Jiang
4th Nov 2015
© 2009 IBM Corporation2
Emily Jiang
▪ WebSphere Application Server Development, CDI Lead @IBM
▪ CDI Expert Group Member
▪ One of the authors of RFC 193 CDI Integration In OSGi
▪ Apache Aries PMC member
Source: If applicable, describe source origin
CDI Integration In OSGi
© 2009 IBM Corporation
What is CDI?
▪ Contexts and Dependency Injection
– A framework to provide
• Type safe dependency injection
• A better approach to binding interceptors to objects, such as interceptors, decorators
• An SPI for developing portable extensions to the containers
3
12/2009
CDI 1.0 (Java EE6)
JSR299
CDI 1.1 (Java EE7)
JSR346
06/2013
CDI 1.2 (1.1 MR)
04/2014
09/2014
CDI 2.0 (start)
JSR365 CDI 2.0 (release)
2016
© 2009 IBM Corporation
CDI Implementations
▪ JBoss Weld (Reference Implementation)
– JBoss Enterprise Application Server
– WildFly
– GlassFish
– Oracle WebLogic Server
– WebSphere Application Server Liberty
profile 8.5.5.6+, EE7 compliance
▪ Apache OpenWebBeans
– TomEE
– Geronimo
– WebSphere Application Server Full
Profile 8.0, 8.5 – EE6 compliance
4
© 2009 IBM Corporation
CDI bean
▪ What is CDI Bean?
– Java class
• Not non-static inner class
• Concrete class or is annotated @Decorator
• Does not implement javax.enterprise.inject.spi.Extension
• Has an appropriate constructor – either:
Default constructor
@Inject constructor
▪ What is special about the CDI Bean?
– Allow the container to create and destroy the instances and associate them with a context
– Inject them into other beans
– Using them in EL expression
– Specialising them with qualifier annotations
– Adding interceptors and decorators
5
© 2009 IBM Corporation
Bean injections
@SessionScoped @Named
public class Login implements Serializable {
@Inject Credentials credentials;
@Inject @UserDatabase EntityManager userDatabase;
private User user;
public void login() {
…
}
public void logout() {
user = null;
}
public boolean isLoggedIn() {
return user != null;
}
}
//jsf usage
<h:panelGroup rendered="#{login.loggedIn}">
signed in as #{currentUser.username}
</h:panelGroup>
6
• 3 types of injection points
o Constructor injection
o Field injection
o Method injection
© 2009 IBM Corporation
Typesafe Injection
@Qualifier
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.PARAMETER, ElementType.METHOD,ElementType.CONSTRUCTOR,ElementType.FIELD,
ElementType.LOCAL_VARIABLE})
public @interface QualifierStyle {
String value();
}
@SessionScoped
public class BreadMaker {
@Produces @QualifierStyle("English")@QualifierGrain
IFood makeEnglishBread( EnglishBread bread) {
bread.createdBy = "Making English bread";
return bread;
}
@Produces @QualifierStyle("French")@QualifierGrain @SessionScoped
IFood makeFrenchBread(FrenchBread bread) {
bread.createdBy = "Making French bread";
return bread;
}
}
7
© 2009 IBM Corporation
Typesafe injection
public class BreakFastEnglishStyle extends BreakFast implements Serializable {
private static final long serialVersionUID = -4055192893910694993L;
@Inject
public BreakFastEnglishStyle(@QualifierStyle("English") @QualifierGrain IFood bread) {
this.bread = bread;
}
}
8
© 2009 IBM Corporation
Interceptor binding
▪ Define the Interceptor Binding
@Inherited
@InterceptorBinding
@Target({ ElementType.METHOD, ElementType.TYPE, ElementType.PARAMETER })
@Retention(RetentionPolicy.RUNTIME)
public @interface MyInterceptor {}
▪ Define the Interceptor
@Interceptor
@MyInterceptor
@Priority(100)
public class OrangeInterceptor {
@AroundInvoke
public Object handle(final InvocationContext ic) throws Exception {
Orange o = new Orange();
o.setOrangeMsg("created by OrangeIntercepter.handle");
GlobalState.addOrange(o);
return ic.proceed();
}
}
9
© 2009 IBM Corporation
Interceptor binding
▪ Bind the interceptor
@ApplicationScoped
public class OrangeSearcherService implements OrangesSearcher {
List<Orange> oranges = new ArrayList<Orange>();
@Override
@MyInterceptor
public List<Orange> search(OrangesCriteria criteria) {
Orange o = new Orange();
o.setOrangeMsg("created by OrangeSearcherService.search");
GlobalState.addOrange(o);
return GlobalState.getOranges();
}
}
10
© 2009 IBM Corporation
CDI Extension
▪ Use CDI Extension to
– Providing its own beans, interceptors and decorators to the container
– Injecting dependencies into its own objects using the dependency injection service
– Providing a context implementation for a custom scope
– Augmenting or overriding the annotation-based metadata with metadata from some other
source
11
© 2009 IBM Corporation
CDI Extension
▪ How?
– Write an extension
public class CustomExtension implements Extension {
<X> void processInjectionTarget(@Observes ProcessInjectionTarget<X> pit, BeanManager
beanManager) {
if ( !pit.getInjectionTarget().getInjectionPoints().isEmpty() ) {
for ( InjectionPoint ip : pit.getInjectionTarget().getInjectionPoints() ) {
System.out.println("Injection Point " + ip + "n");
}
}
}
}
– Package the extension
• Package this portable extension in a jar containing a file named
javax.enterprise.inject.spi.Extension in the META-INF/services directory
• The file content is the fully qualified extension class name
12
© 2009 IBM Corporation
CDI example
13
© 2009 IBM Corporation
Does OSGi need CDI?
14
© 2009 IBM Corporation
Why CDI support needed in OSGi?
▪ OSGi Dependency injection framework: DS, blueprint
– No standards support for runtime annotations
▪ Similar complementary relationship between other containers and CDI containers
▪ Migrating ear files to esa files easier
15
© 2009 IBM Corporation
Terminologies
▪ CDI Provider – An implementation of the CDI 1.2 specification.
▪ CDI Bundle – A CDI-enabled OSGi bundle.
▪ CDI Container – A container for managed beans in a CDI Bundle. Each CDI Bundle has its
own CDI container.
▪ CDI Extender – An application of the extender pattern to discover CDI Bundles and to
manage the CDI container life-cycle on behalf of CDI Bundles.
16
© 2009 IBM Corporation
CDI extender, CDI bundle and CDI container
▪ CDI extenders provides the capability
Provide-Capability = osgi.extender; osgi.extender=osgi.cdi;
uses:=”org.osgi.service.cdi,javax.enterprise.inject.spi”;
version:Version=”1.0”
▪ CDI bundle:
Require-Capability: osgi.extender; filter:="(osgi.extender=osgi.cdi)“
Provide-Capability:osgi.cdi.beans;beans:List<String>=”foo.A,foo.B”
▪ CDI container:
– Register a service with the following service properties:
osgi.cdi.container.symbolicname :CDI bundle’s symbolic name
osgi.cdi.container.version: CDI bundle version
17
© 2009 IBM Corporation
CDI Container Lifecycle
18
© 2009 IBM Corporation
Publishing services in OSGi
19
@Component(properties = {@ComponentProperty(key = "key",
value = "value"), @ComponentProperty(key ="key2", value
= "42", type = “long”)})
public class ExampleComponent {}
CDI
Container
CDI bean
OSGi
Service
Registry
@Component
© 2009 IBM Corporation
Publishing CDI services
▪ Via annotations
– Specify service properties
@Component(properties ={@ComponentProperty(key = "key", value =
"value"),@ComponentProperty(key ="key2", value = "42", type = “long”)})
public class ExampleComponent {}
– Configuration dependency
@Component(requireConfiguration=”PID.of.configuration”)
public class AnotherExampleComponent {}
▪ Via Bundle manifest
Require-Capability: osgi.extender;filter:="(osgi.extender=osgi.cdi)";
components:="org.acme.MyComponent,org.acme.ExampleComponent"
20
© 2009 IBM Corporation
Supported scopes on @Component
▪ CDI builtin scopes
– @ApplicationScoped
– @SessionScoped
– @ConversationScoped
– @RequestScoped
– @Dependent
▪ New scopes
– @BundleScoped
– @PrototypeScoped
– @SingletonScoped
21
© 2009 IBM Corporation
Consuming services in OSGi
22
CDI
Container
CDI bean
OSGi
Service
Registry
@Inject @Service @SomeKey(“somevalue”)
@SomeOtherKey(“someothervalue”)
@Inject @Service(“(somekey=somevalue)”)
@MyServiceProperty(“example”) <->
“(my.service.property=example)"
@Service
@Inject
© 2009 IBM Corporation
Mandatory Service dependencies
23
A B C
@Inject
@Service(“(required=true)”)
@Inject
@Service(“(required=true)”)
© 2009 IBM Corporation
Optional Service dependencies
24
A B C
@Inject
@Service(“(required=true)”)
@Inject
@Service
© 2009 IBM Corporation
Allow Service Injections in vanilla CDI injection points
▪ Support injection to @Inject points without specifying @Service
Require-Capability: osgi.extender;
filter:="(osgi.extender=osgi.cdi)";
at-service:="optional"
25
© 2009 IBM Corporation
BundleContext Injection
@Inject BundleContext context;
Bundle A:
public abstract class MyBaseClass {
@Inject BundleContext bundleContext; Bundle B’s bundle context
}
Bundle B:
@Component
public class MySubClass extends MyBaseClass {
}
26
© 2009 IBM Corporation
BeanManager Service
27
CDI
Container
OSGi
Service
Registry
Register the BeanManager service
javax.enterprise.inject.spi.BeanManager
© 2009 IBM Corporation
CDI Events
▪ The CDI Event (CdiEvent) supports the following event types:
– CREATING - The CDI extender has started creating a CDI Container for the bundle.
– CREATED - The CDI Container is ready. The application is now running.
– WAITING - A service reference is blocking because of unsatisfied mandatory
dependencies. This event can happen multiple times in a row.
– DESTROYING - The CDI Container is being destroyed because the CDI bundle or CDI
extender has stopped.
– DESTROYED - The CDI Container is completely destroyed.
– FAILURE - An error occurred during the creation of the CDI Container.
28
© 2009 IBM Corporation
CdiEvent class
public class CdiEvent {
public static final int CREATING = 1;
public static final int CREATED = 2;
public static final int DESTROYING = 3;
public static final int DESTROYED = 4;
public static final int FAILURE = 5;
public static final int WAITING = 7;
private final int type;
private final Bundle bundle;
private final Bundle extenderBundle;
private final String[] dependencies;
private final Throwable cause;
private final boolean replay;
public int getType() { return type;}
public Bundle getBundle() { return bundle;}
public Bundle getExtenderBundle() { return extenderBundle; }
public String[] getDependencies() { return dependencies == null ? null :
(String[]) dependencies.clone();
public Throwable getCause() { return cause; }
public boolean isReplay() { return replay; }
}
29
© 2009 IBM Corporation
Specification Implementation
▪ Should be able to work with both Weld and OpenWebBeans
▪ An example of implementation: PAX CDI
30
© 2009 IBM Corporation
© 2009 IBM Corporation
Questions
Questions?
32

More Related Content

What's hot

Spring - CDI Interop
Spring - CDI InteropSpring - CDI Interop
Spring - CDI InteropRay Ploski
 
OSGi 4.3 Technical Update: What's New?
OSGi 4.3 Technical Update: What's New?OSGi 4.3 Technical Update: What's New?
OSGi 4.3 Technical Update: What's New?bjhargrave
 
Migrating a JSF-Based Web Application from Spring 3 to Java EE 7 and CDI
Migrating a JSF-Based Web Application from Spring 3 to Java EE 7 and CDIMigrating a JSF-Based Web Application from Spring 3 to Java EE 7 and CDI
Migrating a JSF-Based Web Application from Spring 3 to Java EE 7 and CDIMario-Leander Reimer
 
Modular EJBs in OSGi - Tim Ward
Modular EJBs in OSGi - Tim WardModular EJBs in OSGi - Tim Ward
Modular EJBs in OSGi - Tim Wardmfrancis
 
HowTo Build an OSGI EJB3 Server
HowTo Build an OSGI EJB3 ServerHowTo Build an OSGI EJB3 Server
HowTo Build an OSGI EJB3 Serverekkehard gentz
 
Travelling Light for the Long Haul - Ian Robinson
Travelling Light for the Long Haul -  Ian RobinsonTravelling Light for the Long Haul -  Ian Robinson
Travelling Light for the Long Haul - Ian Robinsonmfrancis
 
OSGi & Java EE in GlassFish - Best of both worlds
OSGi & Java EE in GlassFish - Best of both worldsOSGi & Java EE in GlassFish - Best of both worlds
OSGi & Java EE in GlassFish - Best of both worldsArun Gupta
 
OSGi-enabled Java EE applications in GlassFish
OSGi-enabled Java EE applications in GlassFishOSGi-enabled Java EE applications in GlassFish
OSGi-enabled Java EE applications in GlassFishArun Gupta
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSYoann Gotthilf
 
Building Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience ManagerBuilding Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience ManagerJustin Edelson
 
AEM and Sling
AEM and SlingAEM and Sling
AEM and SlingLo Ki
 
Modern web application development with java ee 7
Modern web application development with java ee 7Modern web application development with java ee 7
Modern web application development with java ee 7Shekhar Gulati
 
Android MvRx Framework 介紹
Android MvRx Framework 介紹Android MvRx Framework 介紹
Android MvRx Framework 介紹Kros Huang
 
REST Development made Easy with ColdFusion Aether
REST Development made Easy with ColdFusion AetherREST Development made Easy with ColdFusion Aether
REST Development made Easy with ColdFusion AetherPavan Kumar
 
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 IndiaArun Gupta
 
Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0Diego Zuluaga
 
Dynamic and modular Web Applications with Equinox and Vaadin
Dynamic and modular Web Applications with Equinox and VaadinDynamic and modular Web Applications with Equinox and Vaadin
Dynamic and modular Web Applications with Equinox and VaadinKai Tödter
 
DEVNET-2002 Coding 201: Coding Skills 201: Going Further with REST and Python...
DEVNET-2002	Coding 201: Coding Skills 201: Going Further with REST and Python...DEVNET-2002	Coding 201: Coding Skills 201: Going Further with REST and Python...
DEVNET-2002 Coding 201: Coding Skills 201: Going Further with REST and Python...Cisco DevNet
 
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)mfrancis
 
Modular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S MakModular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S Makmfrancis
 

What's hot (20)

Spring - CDI Interop
Spring - CDI InteropSpring - CDI Interop
Spring - CDI Interop
 
OSGi 4.3 Technical Update: What's New?
OSGi 4.3 Technical Update: What's New?OSGi 4.3 Technical Update: What's New?
OSGi 4.3 Technical Update: What's New?
 
Migrating a JSF-Based Web Application from Spring 3 to Java EE 7 and CDI
Migrating a JSF-Based Web Application from Spring 3 to Java EE 7 and CDIMigrating a JSF-Based Web Application from Spring 3 to Java EE 7 and CDI
Migrating a JSF-Based Web Application from Spring 3 to Java EE 7 and CDI
 
Modular EJBs in OSGi - Tim Ward
Modular EJBs in OSGi - Tim WardModular EJBs in OSGi - Tim Ward
Modular EJBs in OSGi - Tim Ward
 
HowTo Build an OSGI EJB3 Server
HowTo Build an OSGI EJB3 ServerHowTo Build an OSGI EJB3 Server
HowTo Build an OSGI EJB3 Server
 
Travelling Light for the Long Haul - Ian Robinson
Travelling Light for the Long Haul -  Ian RobinsonTravelling Light for the Long Haul -  Ian Robinson
Travelling Light for the Long Haul - Ian Robinson
 
OSGi & Java EE in GlassFish - Best of both worlds
OSGi & Java EE in GlassFish - Best of both worldsOSGi & Java EE in GlassFish - Best of both worlds
OSGi & Java EE in GlassFish - Best of both worlds
 
OSGi-enabled Java EE applications in GlassFish
OSGi-enabled Java EE applications in GlassFishOSGi-enabled Java EE applications in GlassFish
OSGi-enabled Java EE applications in GlassFish
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Building Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience ManagerBuilding Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience Manager
 
AEM and Sling
AEM and SlingAEM and Sling
AEM and Sling
 
Modern web application development with java ee 7
Modern web application development with java ee 7Modern web application development with java ee 7
Modern web application development with java ee 7
 
Android MvRx Framework 介紹
Android MvRx Framework 介紹Android MvRx Framework 介紹
Android MvRx Framework 介紹
 
REST Development made Easy with ColdFusion Aether
REST Development made Easy with ColdFusion AetherREST Development made Easy with ColdFusion Aether
REST Development made Easy with ColdFusion Aether
 
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
 
Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0
 
Dynamic and modular Web Applications with Equinox and Vaadin
Dynamic and modular Web Applications with Equinox and VaadinDynamic and modular Web Applications with Equinox and Vaadin
Dynamic and modular Web Applications with Equinox and Vaadin
 
DEVNET-2002 Coding 201: Coding Skills 201: Going Further with REST and Python...
DEVNET-2002	Coding 201: Coding Skills 201: Going Further with REST and Python...DEVNET-2002	Coding 201: Coding Skills 201: Going Further with REST and Python...
DEVNET-2002 Coding 201: Coding Skills 201: Going Further with REST and Python...
 
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)
 
Modular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S MakModular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S Mak
 

Similar to CDI Integration in OSGi - Emily Jiang

DS, BP, EJB, CDI, WTF!? - Graham Charters
DS, BP, EJB, CDI, WTF!? - Graham ChartersDS, BP, EJB, CDI, WTF!? - Graham Charters
DS, BP, EJB, CDI, WTF!? - Graham Chartersmfrancis
 
DS, BP, EJB, CDI, WTF!? - Graham Charters
DS, BP, EJB, CDI, WTF!? - Graham ChartersDS, BP, EJB, CDI, WTF!? - Graham Charters
DS, BP, EJB, CDI, WTF!? - Graham Chartersmfrancis
 
Building a right sized, do-anything runtime using OSGi technologies: a case s...
Building a right sized, do-anything runtime using OSGi technologies: a case s...Building a right sized, do-anything runtime using OSGi technologies: a case s...
Building a right sized, do-anything runtime using OSGi technologies: a case s...mfrancis
 
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009Roland Tritsch
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Reviewnjbartlett
 
Revolutionize the API Economy with IBM WebSphere Connect
Revolutionize the API Economy with IBM WebSphere ConnectRevolutionize the API Economy with IBM WebSphere Connect
Revolutionize the API Economy with IBM WebSphere ConnectArthur De Magalhaes
 
AEM and Sling
AEM and SlingAEM and Sling
AEM and SlingLokesh BS
 
New and cool in OSGi R7 - David Bosschaert & Carsten Ziegeler
New and cool in OSGi R7 - David Bosschaert & Carsten ZiegelerNew and cool in OSGi R7 - David Bosschaert & Carsten Ziegeler
New and cool in OSGi R7 - David Bosschaert & Carsten Ziegelermfrancis
 
Open Architecture in the Adobe Marketing Cloud - Summit 2014
Open Architecture in the Adobe Marketing Cloud - Summit 2014Open Architecture in the Adobe Marketing Cloud - Summit 2014
Open Architecture in the Adobe Marketing Cloud - Summit 2014Paolo Mottadelli
 
Enhanced cics cloud enablement and dev ops capabilities
Enhanced cics cloud enablement and dev ops capabilitiesEnhanced cics cloud enablement and dev ops capabilities
Enhanced cics cloud enablement and dev ops capabilitiesnick_garrod
 
S103 cics cloud and dev ops agility
S103 cics cloud and dev ops agilityS103 cics cloud and dev ops agility
S103 cics cloud and dev ops agilitynick_garrod
 
Maximize the power of OSGi in AEM
Maximize the power of OSGi in AEM Maximize the power of OSGi in AEM
Maximize the power of OSGi in AEM ICF CIRCUIT
 
Case Study: Integration Automation Create Delightful API Docs
Case Study: Integration Automation Create Delightful API DocsCase Study: Integration Automation Create Delightful API Docs
Case Study: Integration Automation Create Delightful API DocsPronovix
 
OSGi CDI Integration Specification -- Raymond Augé, Liferay
OSGi CDI Integration Specification -- Raymond Augé, LiferayOSGi CDI Integration Specification -- Raymond Augé, Liferay
OSGi CDI Integration Specification -- Raymond Augé, LiferayOSGi Alliance
 
Funky serverless features at aws
Funky serverless features at awsFunky serverless features at aws
Funky serverless features at awsDoug Winter
 
Command central 9.6 - Features Overview
Command central 9.6 - Features OverviewCommand central 9.6 - Features Overview
Command central 9.6 - Features OverviewSoftware AG
 
Platform as a Service - Cloud Foundry and IBM Bluemix
Platform as a Service - Cloud Foundry and IBM BluemixPlatform as a Service - Cloud Foundry and IBM Bluemix
Platform as a Service - Cloud Foundry and IBM BluemixDavid Currie
 
IBM Lotusphere 2013 AD109: Using the IBM® Sametime® Proxy SDK: WebSphere Port...
IBM Lotusphere 2013 AD109: Using the IBM® Sametime® Proxy SDK: WebSphere Port...IBM Lotusphere 2013 AD109: Using the IBM® Sametime® Proxy SDK: WebSphere Port...
IBM Lotusphere 2013 AD109: Using the IBM® Sametime® Proxy SDK: WebSphere Port...William Holmes
 
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...Carl Tyler
 

Similar to CDI Integration in OSGi - Emily Jiang (20)

Dependency Injection Styles
Dependency Injection StylesDependency Injection Styles
Dependency Injection Styles
 
DS, BP, EJB, CDI, WTF!? - Graham Charters
DS, BP, EJB, CDI, WTF!? - Graham ChartersDS, BP, EJB, CDI, WTF!? - Graham Charters
DS, BP, EJB, CDI, WTF!? - Graham Charters
 
DS, BP, EJB, CDI, WTF!? - Graham Charters
DS, BP, EJB, CDI, WTF!? - Graham ChartersDS, BP, EJB, CDI, WTF!? - Graham Charters
DS, BP, EJB, CDI, WTF!? - Graham Charters
 
Building a right sized, do-anything runtime using OSGi technologies: a case s...
Building a right sized, do-anything runtime using OSGi technologies: a case s...Building a right sized, do-anything runtime using OSGi technologies: a case s...
Building a right sized, do-anything runtime using OSGi technologies: a case s...
 
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Review
 
Revolutionize the API Economy with IBM WebSphere Connect
Revolutionize the API Economy with IBM WebSphere ConnectRevolutionize the API Economy with IBM WebSphere Connect
Revolutionize the API Economy with IBM WebSphere Connect
 
AEM and Sling
AEM and SlingAEM and Sling
AEM and Sling
 
New and cool in OSGi R7 - David Bosschaert & Carsten Ziegeler
New and cool in OSGi R7 - David Bosschaert & Carsten ZiegelerNew and cool in OSGi R7 - David Bosschaert & Carsten Ziegeler
New and cool in OSGi R7 - David Bosschaert & Carsten Ziegeler
 
Open Architecture in the Adobe Marketing Cloud - Summit 2014
Open Architecture in the Adobe Marketing Cloud - Summit 2014Open Architecture in the Adobe Marketing Cloud - Summit 2014
Open Architecture in the Adobe Marketing Cloud - Summit 2014
 
Enhanced cics cloud enablement and dev ops capabilities
Enhanced cics cloud enablement and dev ops capabilitiesEnhanced cics cloud enablement and dev ops capabilities
Enhanced cics cloud enablement and dev ops capabilities
 
S103 cics cloud and dev ops agility
S103 cics cloud and dev ops agilityS103 cics cloud and dev ops agility
S103 cics cloud and dev ops agility
 
Maximize the power of OSGi in AEM
Maximize the power of OSGi in AEM Maximize the power of OSGi in AEM
Maximize the power of OSGi in AEM
 
Case Study: Integration Automation Create Delightful API Docs
Case Study: Integration Automation Create Delightful API DocsCase Study: Integration Automation Create Delightful API Docs
Case Study: Integration Automation Create Delightful API Docs
 
OSGi CDI Integration Specification -- Raymond Augé, Liferay
OSGi CDI Integration Specification -- Raymond Augé, LiferayOSGi CDI Integration Specification -- Raymond Augé, Liferay
OSGi CDI Integration Specification -- Raymond Augé, Liferay
 
Funky serverless features at aws
Funky serverless features at awsFunky serverless features at aws
Funky serverless features at aws
 
Command central 9.6 - Features Overview
Command central 9.6 - Features OverviewCommand central 9.6 - Features Overview
Command central 9.6 - Features Overview
 
Platform as a Service - Cloud Foundry and IBM Bluemix
Platform as a Service - Cloud Foundry and IBM BluemixPlatform as a Service - Cloud Foundry and IBM Bluemix
Platform as a Service - Cloud Foundry and IBM Bluemix
 
IBM Lotusphere 2013 AD109: Using the IBM® Sametime® Proxy SDK: WebSphere Port...
IBM Lotusphere 2013 AD109: Using the IBM® Sametime® Proxy SDK: WebSphere Port...IBM Lotusphere 2013 AD109: Using the IBM® Sametime® Proxy SDK: WebSphere Port...
IBM Lotusphere 2013 AD109: Using the IBM® Sametime® Proxy SDK: WebSphere Port...
 
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
 

More from mfrancis

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...mfrancis
 
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)mfrancis
 
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)mfrancis
 
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 Lyaruumfrancis
 
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...mfrancis
 
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...mfrancis
 
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...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
 
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)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
 
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...mfrancis
 
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)mfrancis
 
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)mfrancis
 
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)mfrancis
 
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...mfrancis
 
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)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
 
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)mfrancis
 
Visualization of OSGi based Software Architectures in Virtual Reality - Lisa ...
Visualization of OSGi based Software Architectures in Virtual Reality - Lisa ...Visualization of OSGi based Software Architectures in Virtual Reality - Lisa ...
Visualization of OSGi based Software Architectures in Virtual Reality - Lisa ...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...
 
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)
 
Visualization of OSGi based Software Architectures in Virtual Reality - Lisa ...
Visualization of OSGi based Software Architectures in Virtual Reality - Lisa ...Visualization of OSGi based Software Architectures in Virtual Reality - Lisa ...
Visualization of OSGi based Software Architectures in Virtual Reality - Lisa ...
 

Recently uploaded

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.pptxHampshireHUG
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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 productivityPrincipled Technologies
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
[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.pdfhans926745
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
[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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

CDI Integration in OSGi - Emily Jiang

  • 1. © 2009 IBM Corporation CDI Integration In OSGi
 
Emily Jiang, WebSphere Application Server Development, CDI Lead Emily Jiang 4th Nov 2015
  • 2. © 2009 IBM Corporation2 Emily Jiang ▪ WebSphere Application Server Development, CDI Lead @IBM ▪ CDI Expert Group Member ▪ One of the authors of RFC 193 CDI Integration In OSGi ▪ Apache Aries PMC member Source: If applicable, describe source origin CDI Integration In OSGi
  • 3. © 2009 IBM Corporation What is CDI? ▪ Contexts and Dependency Injection – A framework to provide • Type safe dependency injection • A better approach to binding interceptors to objects, such as interceptors, decorators • An SPI for developing portable extensions to the containers 3 12/2009 CDI 1.0 (Java EE6) JSR299 CDI 1.1 (Java EE7) JSR346 06/2013 CDI 1.2 (1.1 MR) 04/2014 09/2014 CDI 2.0 (start) JSR365 CDI 2.0 (release) 2016
  • 4. © 2009 IBM Corporation CDI Implementations ▪ JBoss Weld (Reference Implementation) – JBoss Enterprise Application Server – WildFly – GlassFish – Oracle WebLogic Server – WebSphere Application Server Liberty profile 8.5.5.6+, EE7 compliance ▪ Apache OpenWebBeans – TomEE – Geronimo – WebSphere Application Server Full Profile 8.0, 8.5 – EE6 compliance 4
  • 5. © 2009 IBM Corporation CDI bean ▪ What is CDI Bean? – Java class • Not non-static inner class • Concrete class or is annotated @Decorator • Does not implement javax.enterprise.inject.spi.Extension • Has an appropriate constructor – either: Default constructor @Inject constructor ▪ What is special about the CDI Bean? – Allow the container to create and destroy the instances and associate them with a context – Inject them into other beans – Using them in EL expression – Specialising them with qualifier annotations – Adding interceptors and decorators 5
  • 6. © 2009 IBM Corporation Bean injections @SessionScoped @Named public class Login implements Serializable { @Inject Credentials credentials; @Inject @UserDatabase EntityManager userDatabase; private User user; public void login() { … } public void logout() { user = null; } public boolean isLoggedIn() { return user != null; } } //jsf usage <h:panelGroup rendered="#{login.loggedIn}"> signed in as #{currentUser.username} </h:panelGroup> 6 • 3 types of injection points o Constructor injection o Field injection o Method injection
  • 7. © 2009 IBM Corporation Typesafe Injection @Qualifier @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE, ElementType.PARAMETER, ElementType.METHOD,ElementType.CONSTRUCTOR,ElementType.FIELD, ElementType.LOCAL_VARIABLE}) public @interface QualifierStyle { String value(); } @SessionScoped public class BreadMaker { @Produces @QualifierStyle("English")@QualifierGrain IFood makeEnglishBread( EnglishBread bread) { bread.createdBy = "Making English bread"; return bread; } @Produces @QualifierStyle("French")@QualifierGrain @SessionScoped IFood makeFrenchBread(FrenchBread bread) { bread.createdBy = "Making French bread"; return bread; } } 7
  • 8. © 2009 IBM Corporation Typesafe injection public class BreakFastEnglishStyle extends BreakFast implements Serializable { private static final long serialVersionUID = -4055192893910694993L; @Inject public BreakFastEnglishStyle(@QualifierStyle("English") @QualifierGrain IFood bread) { this.bread = bread; } } 8
  • 9. © 2009 IBM Corporation Interceptor binding ▪ Define the Interceptor Binding @Inherited @InterceptorBinding @Target({ ElementType.METHOD, ElementType.TYPE, ElementType.PARAMETER }) @Retention(RetentionPolicy.RUNTIME) public @interface MyInterceptor {} ▪ Define the Interceptor @Interceptor @MyInterceptor @Priority(100) public class OrangeInterceptor { @AroundInvoke public Object handle(final InvocationContext ic) throws Exception { Orange o = new Orange(); o.setOrangeMsg("created by OrangeIntercepter.handle"); GlobalState.addOrange(o); return ic.proceed(); } } 9
  • 10. © 2009 IBM Corporation Interceptor binding ▪ Bind the interceptor @ApplicationScoped public class OrangeSearcherService implements OrangesSearcher { List<Orange> oranges = new ArrayList<Orange>(); @Override @MyInterceptor public List<Orange> search(OrangesCriteria criteria) { Orange o = new Orange(); o.setOrangeMsg("created by OrangeSearcherService.search"); GlobalState.addOrange(o); return GlobalState.getOranges(); } } 10
  • 11. © 2009 IBM Corporation CDI Extension ▪ Use CDI Extension to – Providing its own beans, interceptors and decorators to the container – Injecting dependencies into its own objects using the dependency injection service – Providing a context implementation for a custom scope – Augmenting or overriding the annotation-based metadata with metadata from some other source 11
  • 12. © 2009 IBM Corporation CDI Extension ▪ How? – Write an extension public class CustomExtension implements Extension { <X> void processInjectionTarget(@Observes ProcessInjectionTarget<X> pit, BeanManager beanManager) { if ( !pit.getInjectionTarget().getInjectionPoints().isEmpty() ) { for ( InjectionPoint ip : pit.getInjectionTarget().getInjectionPoints() ) { System.out.println("Injection Point " + ip + "n"); } } } } – Package the extension • Package this portable extension in a jar containing a file named javax.enterprise.inject.spi.Extension in the META-INF/services directory • The file content is the fully qualified extension class name 12
  • 13. © 2009 IBM Corporation CDI example 13
  • 14. © 2009 IBM Corporation Does OSGi need CDI? 14
  • 15. © 2009 IBM Corporation Why CDI support needed in OSGi? ▪ OSGi Dependency injection framework: DS, blueprint – No standards support for runtime annotations ▪ Similar complementary relationship between other containers and CDI containers ▪ Migrating ear files to esa files easier 15
  • 16. © 2009 IBM Corporation Terminologies ▪ CDI Provider – An implementation of the CDI 1.2 specification. ▪ CDI Bundle – A CDI-enabled OSGi bundle. ▪ CDI Container – A container for managed beans in a CDI Bundle. Each CDI Bundle has its own CDI container. ▪ CDI Extender – An application of the extender pattern to discover CDI Bundles and to manage the CDI container life-cycle on behalf of CDI Bundles. 16
  • 17. © 2009 IBM Corporation CDI extender, CDI bundle and CDI container ▪ CDI extenders provides the capability Provide-Capability = osgi.extender; osgi.extender=osgi.cdi; uses:=”org.osgi.service.cdi,javax.enterprise.inject.spi”; version:Version=”1.0” ▪ CDI bundle: Require-Capability: osgi.extender; filter:="(osgi.extender=osgi.cdi)“ Provide-Capability:osgi.cdi.beans;beans:List<String>=”foo.A,foo.B” ▪ CDI container: – Register a service with the following service properties: osgi.cdi.container.symbolicname :CDI bundle’s symbolic name osgi.cdi.container.version: CDI bundle version 17
  • 18. © 2009 IBM Corporation CDI Container Lifecycle 18
  • 19. © 2009 IBM Corporation Publishing services in OSGi 19 @Component(properties = {@ComponentProperty(key = "key", value = "value"), @ComponentProperty(key ="key2", value = "42", type = “long”)}) public class ExampleComponent {} CDI Container CDI bean OSGi Service Registry @Component
  • 20. © 2009 IBM Corporation Publishing CDI services ▪ Via annotations – Specify service properties @Component(properties ={@ComponentProperty(key = "key", value = "value"),@ComponentProperty(key ="key2", value = "42", type = “long”)}) public class ExampleComponent {} – Configuration dependency @Component(requireConfiguration=”PID.of.configuration”) public class AnotherExampleComponent {} ▪ Via Bundle manifest Require-Capability: osgi.extender;filter:="(osgi.extender=osgi.cdi)"; components:="org.acme.MyComponent,org.acme.ExampleComponent" 20
  • 21. © 2009 IBM Corporation Supported scopes on @Component ▪ CDI builtin scopes – @ApplicationScoped – @SessionScoped – @ConversationScoped – @RequestScoped – @Dependent ▪ New scopes – @BundleScoped – @PrototypeScoped – @SingletonScoped 21
  • 22. © 2009 IBM Corporation Consuming services in OSGi 22 CDI Container CDI bean OSGi Service Registry @Inject @Service @SomeKey(“somevalue”) @SomeOtherKey(“someothervalue”) @Inject @Service(“(somekey=somevalue)”) @MyServiceProperty(“example”) <-> “(my.service.property=example)" @Service @Inject
  • 23. © 2009 IBM Corporation Mandatory Service dependencies 23 A B C @Inject @Service(“(required=true)”) @Inject @Service(“(required=true)”)
  • 24. © 2009 IBM Corporation Optional Service dependencies 24 A B C @Inject @Service(“(required=true)”) @Inject @Service
  • 25. © 2009 IBM Corporation Allow Service Injections in vanilla CDI injection points ▪ Support injection to @Inject points without specifying @Service Require-Capability: osgi.extender; filter:="(osgi.extender=osgi.cdi)"; at-service:="optional" 25
  • 26. © 2009 IBM Corporation BundleContext Injection @Inject BundleContext context; Bundle A: public abstract class MyBaseClass { @Inject BundleContext bundleContext; Bundle B’s bundle context } Bundle B: @Component public class MySubClass extends MyBaseClass { } 26
  • 27. © 2009 IBM Corporation BeanManager Service 27 CDI Container OSGi Service Registry Register the BeanManager service javax.enterprise.inject.spi.BeanManager
  • 28. © 2009 IBM Corporation CDI Events ▪ The CDI Event (CdiEvent) supports the following event types: – CREATING - The CDI extender has started creating a CDI Container for the bundle. – CREATED - The CDI Container is ready. The application is now running. – WAITING - A service reference is blocking because of unsatisfied mandatory dependencies. This event can happen multiple times in a row. – DESTROYING - The CDI Container is being destroyed because the CDI bundle or CDI extender has stopped. – DESTROYED - The CDI Container is completely destroyed. – FAILURE - An error occurred during the creation of the CDI Container. 28
  • 29. © 2009 IBM Corporation CdiEvent class public class CdiEvent { public static final int CREATING = 1; public static final int CREATED = 2; public static final int DESTROYING = 3; public static final int DESTROYED = 4; public static final int FAILURE = 5; public static final int WAITING = 7; private final int type; private final Bundle bundle; private final Bundle extenderBundle; private final String[] dependencies; private final Throwable cause; private final boolean replay; public int getType() { return type;} public Bundle getBundle() { return bundle;} public Bundle getExtenderBundle() { return extenderBundle; } public String[] getDependencies() { return dependencies == null ? null : (String[]) dependencies.clone(); public Throwable getCause() { return cause; } public boolean isReplay() { return replay; } } 29
  • 30. © 2009 IBM Corporation Specification Implementation ▪ Should be able to work with both Weld and OpenWebBeans ▪ An example of implementation: PAX CDI 30
  • 31. © 2009 IBM Corporation
  • 32. © 2009 IBM Corporation Questions Questions? 32