Network Deployment (Distributed operating systems), v8.0 > End-to-end paths > Web services - RESTful services > Use Java contexts and dependency injection with JAX-RS
Previous Step Next Step
Implement JAX-RS resources with JCDI functionality.
Step 4: Use Java contexts and dependency injection with JAX-RS JAX-WSWe can use any of the JCDI features separately or with one another to make the applications easier to create, maintain, and test.
Configure the JAX-RS application.
Procedure
- Implement JAX-RS resources with dependency injection
Use this method to use dependency injection to separate the creation of new instances of Java types from the use of those Java types in the code. Dependency injection allows for more easily testable code, while also improving the ability to manage applications.
- Implement JAX-RS resources with different lifecycle scopes
Use this method to use lifecycle scopes to better manage the application code. Lifecycle scopes only apply to managed beans.
- Implement JAX-RS resources with decorators and method interceptors
Use this method to write decorators and interceptors for your JAX-RS resource types.
Support information (generally applicable)
- Implement JAX-RS resources with dependency injection
- Implement JAX-RS resources with different lifecycle scopes
- Implement a JAX-RS resource with decorators and method interceptors
What to do next
Assemble JAX-RS web applications.
Previous Step Next Step