Weld SiteCommunity Documentation

Weld 2.3.0.Final - CDI Reference Implementation

CDI: Contexts and Dependency Injection for the Java EE platform


A note about naming and nomenclature
I. Beans
1. Introduction
1.1. What is a bean?
1.2. Getting our feet wet
2. More about beans
2.1. The anatomy of a bean
2.1.1. Bean types, qualifiers and dependency injection
2.1.2. Scope
2.1.3. EL name
2.1.4. Alternatives
2.1.5. Interceptor binding types
2.2. What kinds of classes are beans?
2.2.1. Managed beans
2.2.2. Session beans
2.2.3. Producer methods
2.2.4. Producer fields
3. JSF web application example
4. Dependency injection and programmatic lookup
4.1. Injection points
4.2. What gets injected
4.3. Qualifier annotations
4.4. The built-in qualifiers @Default and @Any
4.5. Qualifiers with members
4.6. Multiple qualifiers
4.7. Alternatives
4.8. Fixing unsatisfied and ambiguous dependencies
4.9. Client proxies
4.10. Obtaining a contextual instance by programmatic lookup
4.11. The InjectionPoint object
5. Scopes and contexts
5.1. Scope types
5.2. Built-in scopes
5.3. The conversation scope
5.3.1. Conversation demarcation
5.3.2. Conversation propagation
5.3.3. Conversation timeout
5.3.4. CDI Conversation filter
5.3.5. Lazy and eager conversation context initialization
5.4. The singleton pseudo-scope
5.5. The dependent pseudo-scope
5.6. The @New qualifier
II. Getting Start with Weld, the CDI Reference Implementation
6. Getting started with Weld
6.1. Prerequisites
6.2. Deploying to WildFly
6.3. Deploying to GlassFish
6.4. Deploying to Apache Tomcat
6.5. Deploying to Jetty
7. Diving into the Weld examples
7.1. The numberguess example in depth
7.1.1. The numberguess example in Apache Tomcat or Jetty
7.2. The numberguess example for Java SE with Swing
7.2.1. Creating the Eclipse project
7.2.2. Running the example from Eclipse
7.2.3. Running the example from the command line
7.2.4. Understanding the code
7.3. The translator example in depth
III. Loose coupling with strong typing
8. Producer methods
8.1. Scope of a producer method
8.2. Injection into producer methods
8.3. Use of @New with producer methods
8.4. Disposer methods
9. Interceptors
9.1. Interceptor bindings
9.2. Implementing interceptors
9.3. Enabling interceptors
9.4. Interceptor bindings with members
9.5. Multiple interceptor binding annotations
9.6. Interceptor binding type inheritance
9.7. Use of @Interceptors
10. Decorators
10.1. Delegate object
10.2. Enabling decorators
11. Events
11.1. Event payload
11.2. Event observers
11.3. Event producers
11.4. Conditional observer methods
11.5. Event qualifiers with members
11.6. Multiple event qualifiers
11.7. Transactional observers
12. Stereotypes
12.1. Default scope for a stereotype
12.2. Interceptor bindings for stereotypes
12.3. Name defaulting with stereotypes
12.4. Alternative stereotypes
12.5. Stereotype stacking
12.6. Built-in stereotypes
13. Specialization, inheritance and alternatives
13.1. Using alternative stereotypes
13.2. A minor problem with alternatives
13.3. Using specialization
14. Java EE component environment resources
14.1. Defining a resource
14.2. Typesafe resource injection
IV. CDI and the Java EE ecosystem
15. Java EE integration
15.1. Built-in beans
15.2. Injecting Java EE resources into a bean
15.3. Calling a bean from a servlet
15.4. Calling a bean from a message-driven bean
15.5. JMS endpoints
15.6. Packaging and deployment
15.6.1. Explicit bean archive
15.6.2. Implicit bean archive
15.6.3. What archive is not a bean archive
15.6.4. Embeddable EJB container
16. Portable extensions
16.1. Creating an Extension
16.2. Container lifecycle events
16.3. The BeanManager object
16.4. The CDI class
16.5. The InjectionTarget interface
16.6. The Bean interface
16.7. Registering a Bean
16.8. Wrapping an AnnotatedType
16.9. Overriding attributes of a bean by wrapping BeanAttributes
16.10. Wrapping an InjectionTarget
16.11. Overriding InjectionPoint
16.12. Manipulating interceptors, decorators and alternatives enabled for an application
16.13. The Context and AlterableContext interfaces
17. Next steps
V. Weld Reference Guide
18. Application servers and environments supported by Weld
18.1. Using Weld with WildFly
18.2. GlassFish
18.3. Servlet containers (such as Tomcat or Jetty)
18.3.1. Tomcat
18.3.2. Jetty
18.3.3. Undertow
18.3.4. WildFly Web
18.3.5. Bean Archive Isolation
18.3.6. Implicit Bean Archive Support
18.4. Java SE
18.4.1. CDI SE Module
18.4.2. Bootstrapping CDI SE
18.4.3. Thread Context
18.4.4. Setting the Classpath
18.4.5. Bean Archive Isolation
18.4.6. Implicit Bean Archive Support
18.5. OSGi
19. Configuration
19.1. Weld configuration
19.1.1. Relaxed construction
19.1.2. Concurrent deployment configuration
19.1.3. Thread pool configuration
19.1.4. Non-portable mode during application initialization
19.1.5. Bounding the cache size for resolved injection points
19.1.6. Debugging generated bytecode
19.1.7. Injectable reference lookup optimization
19.1.8. Bean identifier index optimization
19.1.9. Development Mode
19.1.10. Default bean names
19.2. Excluding classes from scanning and deployment
19.3. Mapping CDI contexts to HTTP requests
20. Logging
20.1. Java EE containers
20.2. Servlet containers
20.3. Weld SE
21. Development Mode
21.1. How to enable the development mode
21.1.1. Web application
21.1.2. Weld SE
21.1.3. Is The Development Mode Enabled?
21.2. Development Tools
21.2.1. Probe
22. Context Management
22.1. Managing the built in contexts
A. Integrating Weld into other environments
A.1. The Weld SPI
A.1.1. Deployment structure
A.1.2. EJB descriptors
A.1.3. EE resource injection and resolution services
A.1.4. EJB services
A.1.5. JPA services
A.1.6. Transaction Services
A.1.7. Resource Services
A.1.8. Web Service Injection Services
A.1.9. Injection Services
A.1.10. Security Services
A.1.11. Initialization and shutdown
A.1.12. Resource loading
A.1.13. AnnotationDiscovery
A.1.14. ClassFileServices
A.1.15. Registering services
A.2. The contract with the container
A.2.1. Classloader isolation
A.2.2. Servlet
A.2.3. CDI Conversation Filter
A.2.4. JSF
A.2.5. JSP
A.2.6. Session Bean Interceptor
A.2.7. The weld-core.jar
A.2.8. Binding the manager in JNDI
A.2.9. CDIProvider
A.2.10. Performing CDI injection on Java EE component classes
A.2.11. Around-construct interception
A.2.12. Probe Development Tool (Optional)
A.3. Migration notes
A.3.1. Migration from Weld 1.x to 2.0
A.3.2. Migration from Weld 2.0 to 2.1
A.3.3. Migration from Weld 2.1 to 2.2
A.3.4. Migration from Weld 2.2 to 2.3