Java Platform, Enterprise Edition (Java EE) 8 The Java EE Tutorial

## Building and Running the CDI Advanced Examples

The examples are in the `tut-install/examples/cdi/` directory. To build and run the examples, you will do the following.

1. Use NetBeans IDE or the Maven tool to compile, package, and deploy the example.

2. Run the example in a web browser.

See Chapter 2, "Using the Tutorial Examples", for basic information on installing, building, and running the examples.

The following topics are addressed here:

- The encoder Example: Using Alternatives

- The producermethods Example: Using a Producer Method to Choose a Bean Implementation

- The producerfields Example: Using Producer Fields to Generate Resources

- The billpayment Example: Using Events and Interceptors

- The decorators Example: Decorating a Bean

Copyright © 2017, Oracle and/or its affiliates. All rights reserved.