Enterprise Java Development@TOPIC@

Chapter 95. Injecting Specific EJB Resources without ENC

95.1. Injecting EJB SessionContext
95.2. Injecting JDBC Resources
95.3. Injecting JPA Resources
95.4. Injecting EJB Resources
95.5. Summary

This chapter focuses on injecting relevant resources into an EJB using modern injection techniques. From the points made in the previous chapter -- you know that there are more tedious and verbose techniques from the older EJB specs that pre-date @Annotations and ease-of-use enhancements. They will not be included here.

Inject a Resource to locate information from Container

private @Resource SessionContext ctx;

Inject a pool of database connections

Inject access to the Persistence Unit

Inject access to other EJBs