Weld SiteCommunity Documentation

Weld 3.0.2.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.10.1. Enhanced version of javax.enterprise.inject.Instance
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
II. Getting Start with Weld, the CDI Reference Implementation
6. Getting started with Weld
6.1. Prerequisites
6.2. First try
6.3. Deploying to WildFly
6.4. Deploying to GlassFish
6.5. Deploying to Apache Tomcat
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. 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
9.8. Enhanced version of javax.interceptor.InvocationContext
10. public void afterPersonalBlogUpdate(@Observes @Updated @Personal @Blog Document document) { … }
10.1. Transactional observers
10.2. Enhanced version of javax.enterprise.event.Event
11. Stereotypes
11.1. Default scope for a stereotype
11.2. Interceptor bindings for stereotypes
11.3. Name defaulting with stereotypes
11.4. Alternative stereotypes
11.5. Stereotype stacking
11.6. Built-in stereotypes
12. Specialization, inheritance and alternatives
12.1. Using alternative stereotypes
12.2. A minor problem with alternatives
12.3. Using specialization
13. Java EE component environment resources
13.1. Defining a resource
13.2. Typesafe resource injection
IV. CDI and the Java EE ecosystem
14. Java EE integration
14.1. Built-in beans
14.2. Injecting Java EE resources into a bean
14.3. Calling a bean from a servlet
14.4. Calling a bean from a message-driven bean
14.5. JMS endpoints
14.6. Packaging and deployment
14.6.1. Explicit bean archive
14.6.2. Implicit bean archive
14.6.3. Which archive is not a bean archive
14.6.4. Embeddable EJB container
15. Portable extensions
15.1. Creating an Extension
15.2. Container lifecycle events
15.2.1. Configurators
15.2.2. Weld-enriched container lifecycle events
15.3. The BeanManager object
15.4. The CDI class
15.5. The InjectionTarget interface
15.6. The Bean interface
15.7. Registering a Bean
15.8. Configuring an AnnotatedType
15.9. Overriding attributes of a bean
15.10. Wrapping an InjectionTarget
15.11. Overriding InjectionPoint
15.12. Manipulating interceptors, decorators and alternatives enabled for an application
15.13. The Context and AlterableContext interfaces
16. Next steps
V. Weld Reference Guide
17. Application servers and environments supported by Weld
17.1. Using Weld with WildFly
17.2. GlassFish
17.3. Servlet containers (such as Tomcat or Jetty)
17.3.1. Tomcat
17.3.2. Jetty
17.3.3. Undertow
17.3.4. WildFly Web
17.3.5. Bean Archive Isolation
17.3.6. Implicit Bean Archive Support
17.3.7. Servlet Container Detection
17.4. Java SE
17.4.1. CDI SE Module
17.4.2. Bootstrapping CDI SE
17.4.3. Request Context
17.4.4. Thread Context
17.4.5. Setting the Classpath
17.4.6. Bean Archive Isolation
17.4.7. Implicit Bean Archive Support
17.5. Weld SE and Weld Servlet cooperation
17.6. OSGi
18. Configuration
18.1. Weld configuration
18.1.1. Relaxed construction
18.1.2. Concurrent deployment configuration
18.1.3. Thread pool configuration
18.1.4. Non-portable mode during application initialization
18.1.5. Proxying classes with final methods
18.1.6. Bounding the cache size for resolved injection points
18.1.7. Debugging generated bytecode
18.1.8. Injectable reference lookup optimization
18.1.9. Bean identifier index optimization
18.1.10. Rolling upgrades ID delimiter
18.1.11. Development Mode
18.1.12. Conversation timeout and Conversation concurrent access timeout
18.1.13. Veto types without bean defining annotation
18.2. Defining external configuration
18.3. Excluding classes from scanning and deployment
18.4. Mapping CDI contexts to HTTP requests
19. Logging
19.1. Java EE containers
19.2. Servlet containers
19.3. Weld SE
20. Development Mode
20.1. How to enable the development mode
20.1.1. Web application
20.1.2. Weld SE
20.1.3. Is The Development Mode Enabled?
20.2. Development Tools
20.2.1. Probe
20.2.2. Validation Report
21. Context Management
21.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. ClassFileServices
A.1.14. 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
A.3.5. Migration from Weld 2.3 to 2.4
A.3.6. Migration from Weld 2.4 to 3.0