SeamFramework.orgCommunity Documentation

Web Beans: Java Contexts and Dependency Injection

The new standard for dependency injection and contextual state management

I. Using contextual objects
1. Getting started with Web Beans
1.1. Your first Web Bean
1.2. What is a Web Bean?
1.2.1. API types, binding types and dependency injection
1.2.2. Deployment types
1.2.3. Scope
1.2.4. Web Bean names and Unified EL
1.2.5. Interceptor binding types
1.3. What kinds of objects can be Web Beans?
1.3.1. Simple Web Beans
1.3.2. Enterprise Web Beans
1.3.3. Producer methods
1.3.4. JMS endpoints
2. JSF web application example
3. Web Beans, the Reference Implementation of JSR-299
3.1. Using JBoss AS 5
3.2. Using Apache Tomcat 6.0
3.3. Using GlassFish
3.4. The numberguess example
3.4.1. The numberguess example for Tomcat
3.5. The translator example
4. Dependency injection
4.1. Binding annotations
4.1.1. Binding annotations with members
4.1.2. Combinations of binding annnotations
4.1.3. Binding annotations and producer methods
4.1.4. The default binding type
4.2. Deployment types
4.2.1. Enabling deployment types
4.2.2. Deployment type precedence
4.2.3. Example deployment types
4.3. Fixing unsatisfied dependencies
4.4. Client proxies
4.5. Obtaining a Web Bean by programatic lookup
4.6. Lifecycle callbacks, @Resource, @EJB and @PersistenceContext
4.7. 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.4. The dependent pseudo-scope
5.4.1. The @New annotation
6. Producer methods
6.1. Scope of a producer method
6.2. Injection into producer methods
6.3. Use of @New with producer methods
II. Developing loosely-coupled code
7. Interceptors
7.1. Interceptor bindings
7.2. Implementing interceptors
7.3. Enabling interceptors
7.4. Interceptor bindings with members
7.5. Multiple interceptor binding annotations
7.6. Interceptor binding type inheritance
7.7. Use of @Interceptors
8. Decorators
8.1. Delegate attributes
8.2. Enabling decorators
9. Events
9.1. Event observers
9.2. Event producers
9.3. Registering observers dynamically
9.4. Event bindings with members
9.5. Multiple event bindings
9.6. Transactional observers
III. Making the most of strong typing
10. Stereotypes
10.1. Default scope and deployment type for a stereotype
10.2. Restricting scope and type with a stereotype
10.3. Interceptor bindings for stereotypes
10.4. Name defaulting with stereotypes
10.5. Standard stereotypes
11. Specialization
11.1. Using specialization
11.2. Advantages of specialization
12. Defining Web Beans using XML
12.1. Declaring Web Bean classes
12.2. Declaring Web Bean metadata
12.3. Declaring Web Bean members
12.4. Declaring inline Web Beans
12.5. Using a schema
IV. Web Beans and the Java EE ecosystem
13. Java EE integration
13.1. Injecting Java EE resources into a Web Bean
13.2. Calling a Web Bean from a Servlet
13.3. Calling a Web Bean from a Message-Driven Bean
13.4. JMS endpoints
13.5. Packaging and deployment
14. Extending Web Beans
14.1. The Manager object
14.2. The Bean class
14.3. The Context interface
15. Next steps
V. Web Beans Reference
16. Application Servers and environments supported by Web Beans
16.1. Using Web Beans with JBoss AS
16.2. Glassfish
16.3. Tomcat (or any plain Servlet container)
16.4. Java SE
16.4.1. Web Beans SE Module
17. JSR-299 extensions available as part of Web Beans
17.1. Web Beans Logger
17.2. XSD Generator for JSR-299 XML deployment descriptors
A. Integrating the Web Beans RI into other environments
A.1. The Web Beans RI SPI
A.1.1. Web Bean Discovery
A.1.2. EJB services
A.1.3. JPA services
A.1.4. Transaction Services
A.1.5. The application context
A.1.6. Bootstrap and shutdown
A.1.7. JNDI
A.1.8. Resource loading
A.1.9. Servlet injection
A.2. The contract with the container