Skip Headers

Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g Release 3 (10.1.3) B14428-01 |
| Home | Solution Area | Contents | Index

Previous | Next |

# Accessing an EJB 3.0 EJBContext

For EJB 3.0 session and message-driven beans, you can access the `EJBContext` that OC4J provides (see "Using Resource Injection").

For more information, see:

- "What is EJB Context?"

- "What is Session Context?"

- "What is Message Driven Context?"

## Using Resource Injection

In an EJB 3.0 EJB client, you can use `@Resource` injection to access the `EJBContext` as Example 29-22 shows.

Example 29-22 Accessing EJBContext Using @Resource

    @Resource SessionContext ctx;