Go to main content
1/12
Contents
Title and Copyright Information
Preface
Documentation Accessibility
Conventions
1
Introduction and Roadmap
Document Scope and Audience
Guide to this Document
Related Documentation
EJB Documentation in WebLogic Server
Additional EJB Information
Comprehensive Examples for the EJB Developer
EJB 3.2 Examples
EJB 3.1 Examples
EJB 3.0 Example
New and Changed Features in this Release
2
Understanding Enterprise JavaBeans
New Features and Changes in EJB
What Is New and Changed in EJB 3.2
What Was New and Changed in EJB 3.1
What Was New and Changed in EJB 3.0
Understanding EJB Components
Session EJBs Implement Business Logic
Stateful Session Beans
Stateless Session Beans
Singleton Session Beans
Message-Driven Beans Implement Loosely Coupled Business Logic
EJB Anatomy and Environment
EJB Components
The EJB Container
EJB Metadata Annotations
Optional EJB Deployment Descriptors
EJB Clients and Communications
Accessing EJBs
EJB Communications
Securing EJBs
3
Simple Enterprise JavaBeans Examples
Simple Java Examples of 3.x EJBs
Example of a Simple No-interface Stateless EJB
Example of a Simple Business Interface Stateless EJB
Example of a Simple Stateful EJB
Example of an Interceptor Class
Packaged EJB 3.2 Examples in WebLogic Server
EJB 3.2: Example of Using the Session Bean Lifecyle
EJB 3.2: Example of a Message-Driven Bean with No-Methods Listener
Packaged EJB 3.1 Examples in WebLogic Server
EJB 3.1: Example of a Singleton Session Bean
EJB 3.1: Example of an Asynchronous Method EJB
EJB 3.1: Example of a Calendar-based Timer EJB
EJB 3.1: Example of Simplified No-interface Programming and Packaging in a WAR File
EJB 3.1: Example of Using a Portable Global JNDI Name in an EJB
EJB 3.1: Example of Using the Embeddable EJB Container in Java SE
EJB 3.0: Example of Invoking an Entity From A Session Bean
4
Iterative Development of Enterprise JavaBeans
Overview of the EJB Development Process
Create a Source Directory
Directory Structure for Packaging a JAR
Directory Structure for Packaging a WAR
Program the Annotated EJB Class
Program the EJB Interface
Accessing EJBs Using the No-Interface Client View
Accessing EJBs Using the Business Interface
Business Interface Application Exceptions
Using Generics in EJBs
Serializing and Deserializing Business Objects
Optionally Program Interceptors
Optionally Program the EJB Timer Service
Overview of the Timer Service
Calendar-based EJB Timers
Automatically-created EJB Timers
Non-persistent Timers
Clustered Versus Local EJB Timer Services
Clustered EJB Timer Services
Local EJB Timer Services
Configuring Clustered EJB Timers
Using Java Programming Interfaces to Program Timer Objects
EJB 3.2 Timer-related Programming Interfaces
WebLogic Server-specific Timer-related Programming Interfaces
Programming Access to EJB Clients
Remote Clients
Local Clients
Looking Up EJBs From Clients
Using Dependency Injection
Using the JNDI Portable Syntax
Customizing JNDI Names
Configuring EJBs to Send Requests to a URL
Specifying an HTTP Resource by URL
Specifying an HTTP Resource by Its JNDI Name
Accessing HTTP Resources from Bean Code
Configuring Network Communications for an EJB
Programming and Configuring Transactions
Programming Container-Managed Transactions
Configuring Automatic Retry of Container-Managed Transactions
Programming Bean-Managed Transactions
Programming Transactions That Are Distributed Across EJBs
Calling multiple EJBs from a client's transaction context
Using an EJB "Wrapper” to Encapsulate a Cross-EJB Transaction
Compile Java Source
Optionally Create and Edit Deployment Descriptors
Packaging EJBs
Packaging EJBs in a JAR
Packaging an EJB In a WAR
Deploying EJBs
5
Programming the Annotated EJB Class
Overview of Metadata Annotations and EJB Bean Files
Programming the Bean File: Requirements and Changes From EJB 2.x
Bean Class Requirements and Changes From EJB 2.x
Bean Class Method Requirements
Programming the Bean File
Typical Steps When Programming the Bean File
Specifying the Business and Other Interfaces
Specifying the Business Interface
Specifying the No-interface View
Specifying the Bean Type (Stateless, Singleton, Stateful, or Message-Driven)
Injecting Resource Dependency into a Variable or Setter Method
Invoking a 3.0 Entity
Injecting Persistence Context Using Metadata Annotations
Finding an Entity Using the EntityManager API
Creating and Updating an Entity Using EntityManager
Specifying Interceptors for Business Methods or Life Cycle Callback Events
Specifying Business or Life Cycle Interceptors: Typical Steps
Programming the Interceptor Class
Programming Business Method Interceptor Methods
Programming Asynchronous Business Methods
Programming Life Cycle Callback Interceptor Methods
Specifying Default Interceptor Methods
Saving State Across Interceptors With the InvocationContext API
Programming Application Exceptions
Securing Access to the EJB
Specifying Transaction Management and Attributes
Complete List of Metadata Annotations By Function
Annotations to Specify the Bean Type
Annotations to Specify the Local or Remote Interfaces
Annotations to Support EJB 2.x Client View
Annotations to Invoke a 3.0 Entity Bean
Transaction-Related Annotations
Annotations to Specify Interceptors
Annotations to Specify Life Cycle Callbacks
Security-Related Annotations
Context Dependency Annotations
Timeout and Exceptions Annotations
Timer and Scheduling Annotations
6
Deployment Guidelines for Enterprise JavaBeans
Before You Deploy an EJB
Understanding and Performing Deployment Tasks
Deployment Guidelines for EJBs
Deploying Standalone EJBs as Part of an Enterprise Application
Deploying EJBs as Part of an Web Application
Deploying EJBs That Call Each Other in the Same Application
Switching Protocol Limitation
Deploying EJBs That Use Dependency Injection
Deploying Homogeneously to a Cluster
Deploying EJBs to a Cluster
Redeploying an EJB
Using FastSwap Deployment to Minimize Deployment
Understanding Warning Messages
Disabling EJB Deployment Warning Messages
7
Using an Embedded EJB Container in Oracle WebLogic Server
Overview of the Embeddable EJB Container
EJB Lite Functionality Supported in the Embedded EJB Container
8
Configuring the Persistence Provider in Oracle WebLogic Server
Overview of Oracle TopLink
Specifying a Persistence Provider
Setting the Default Provider for the Domain
Specifying the Persistence Provider in an Application
Using Oracle TopLink in Oracle WebLogic Server
A
EJB Metadata Annotations Reference
Overview of EJB 3.x Annotations
Annotations for Stateless, Stateful, and Message-Driven Beans
javax.ejb.AccessTimeout
Description
Attributes
javax.ejb.ActivationConfigProperty
Description
Attributes
javax.ejb.AfterBegin
Description
javax.ejb.AfterCompletion
Description
javax.ejb.ApplicationException
Description
Attributes
javax.ejb.Asynchronous
Description
javax.ejb.BeforeCompletion
Description
javax.ejb.ConcurrencyManagement
Description
Attributes
javax.ejb.DependsOn
Description
Attributes
javax.ejb.EJB
Description
Attributes
javax.ejb.EJBs
Description
Attribute
javax.ejb.Init
Description
Attributes
javax.ejb.Local
Description
Attributes
javax.ejb.LocalBean
Description
javax.ejb.LocalHome
Description
Attributes
javax.ejb.Lock
Description
Attributes
javax.ejb.MessageDriven
Description
Attributes
javax.ejb.PostActivate
Description
javax.ejb.PrePassivate
Description
javax.ejb.Remote
Description
Attributes
javax.ejb.RemoteHome
Description
Attributes
javax.ejb.Remove
Description
Attributes
javax.ejb.Schedule
Description
Calendar-based Schedule Elements
Forms of Supported Element Values
Additional Rules for Schedule Specification Elements
Attributes
javax.ejb.Schedules
Description
Attributes
javax.ejb.Singleton
Description
Attributes
javax.ejb.Startup
Description
javax.ejb.StatefulTimeout
Description
Attributes
javax.ejb.Stateless
Description
Attributes
javax.ejb.Timeout
Description
javax.ejb.TransactionAttribute
Description
Attributes
javax.ejb.TransactionManagement
Description
Attributes
Annotations Used to Configure Interceptors
javax.interceptor.AroundInvoke
Description
javax.interceptor.ExcludeClassInterceptors
Description
javax.interceptor.ExcludeDefaultInterceptors
Description
javax.interceptor.Interceptors
Description
Attributes
Annotations Used to Interact With Entity Beans
javax.persistence.PersistenceContext
Description
Attributes
javax.persistence.PersistenceContexts
Description
Attributes
javax.persistence.PersistenceUnit
Description
Attributes
javax.persistence.PersistenceUnits
Description
Attributes
Standard JDK Annotations Used By EJB 3.x
javax.annotation.PostConstruct
Description
javax.annotation.PreDestroy
Description
javax.annotation.Resource
Description
Attributes
javax.annotation.Resources
Description
Attributes
Standard Security-Related JDK Annotations Used by EJB 3.x
javax.annotation.security.DeclareRoles
Description
Attributes
javax.annotation.security.DenyAll
Description
javax.annotation.security.PermitAll
Description
javax.annotation.security.RolesAllowed
Description
Attributes
javax.annotation.security.RunAs
Description
Attributes
WebLogic Annotations
weblogic.javaee.AllowRemoveDuringTransaction
Description
weblogic.javaee.CallByReference
Description
weblogic.javaee.DisableWarnings
Description
Attributes
weblogic.javaee.EJBReference
Description
Attribute
weblogic.javaee.Idempotent
Description
Attributes
weblogic.javaee.JMSClientID
Description
Attributes
weblogic.javaee.JNDIName
Description
Attributes
weblogic.javaee.JNDINames
Description
Attributes
weblogic.javaee.MessageDestinationConfiguration
Description
Attributes
weblogic.javaee.TransactionIsolation
Description
Attributes
weblogic.javaee.TransactionTimeoutSeconds
Description
Attributes
Scripting on this page enhances content navigation, but does not change the content in any way.