Weld SiteCommunity Documentation

Part V. Weld Reference Guide

Weld is the reference implementation of CDI, and is used by WildFly, GlassFish and WebLogic to provide CDI services for Java Enterprise Edition (Java EE) applications. Weld also goes beyond the environments and APIs defined by the CDI specification by providing support for a number of other environments (such as a servlet container such as Tomcat, or Java SE).

You might also want to check out DeltaSpike project which provides portable extensions to CDI.

If you want to get started quickly using Weld (and, in turn, CDI) with WildFly, GlassFish or Tomcat and experiment with one of the examples, take a look at Chapter 6, Getting started with Weld. Otherwise read on for a exhaustive discussion of using Weld in all the environments and application servers it supports and the Weld extensions.

Table of Contents

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. Default bean names
18.1.13. Conversation timeout and Conversation concurrent access timeout
18.1.14. Veto types without bean defining annotation
18.1.15. Allow vetoed alternatives
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. 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
A.3.5. Migration from Weld 2.3 to 2.4