7 Using an Embedded EJB Container in Oracle WebLogic Server

This chapter provides an overview of using an embeddable EJB container in Oracle WebLogic Server.

This chapter includes the following sections:

7.1 Overview of the Embeddable EJB Container

Unlike traditional Java EE server-based execution, embeddable container usage allows client code and its corresponding enterprise beans to run in a Java SE environment without having to deploy them to a Java EE server. This provides better support for testing, offline processing (e.g., batch jobs), and the use of the EJB programming model in desktop applications.

Most of the services present in the enterprise bean container in a Java EE server are available in the embedded enterprise bean container, including injection, container-managed transactions, and security. Enterprise bean components execute similarly in both embedded and Java EE environments, and therefore the same enterprise bean can be easily reused in both standalone and networked applications.

For a detailed example of using the Embedded EJB container in a Java SE environment, see EJB 3.1: Example of Using the Embeddable EJB Container in Java SE.

7.2 EJB Lite Functionality Supported in the Embedded EJB Container

The EJB Lite subset of the EJB 3.2 API is supported in the Embedded EJB Container. EJB Lite is by definition a subset of functionality and doesn't describe any new feature or functionality. This section outlines the requirements of EJB Lite support as defined by the EJB 3.2 specification.

Table 7-1 represents the official requirements for EJB Lite functionality support as defined by the EJB 3.2 specification.

Table 7-1 Requirements for EJB Lite vs. EJB 3.2 Full

Requirements EJB Lite EJB 3.2 Full

Components

Session Beans (stateful, stateless, singleton)

Yes

Yes

Message-Driven Beans

No

Yes

2.x/1.1 CMP/BMP Entity Beans

No

Yes

JPA 2.1

Yes

Yes

Session Bean Client Views

Local/No Interface

Yes

Yes

3.x Remote

No

Yes

2.x Remote Home/Component

No

Yes

JAX-WS Web Services Endpoint

No

Yes

JAX-RPC Web Services Endpoint

No

Yes

Services

EJB Timer Service (non-persistent)

Yes

Yes

Asynchronous Session Bean Invocations (local)

Yes

Yes

Interceptors

Yes

Yes

RMI-IIOP Interoperability

No

Yes

Container-managed Transactions/Bean-managed Transactions

Yes

Yes

Declarative and Programmatic Security

Yes

Yes

Miscellaneous

Embeddable API

Yes

Yes