Go to main content
1/14
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
New 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.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.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.1 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 2.x
Bean Class Requirements and Changes From 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
Deploying EJBs That Use Dependency Injection
Deploying Homogeneously to a Cluster
Deploying Pinned 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
Requirements for Using the Embedded EJB Container with WebLogic Server
EJB 3.1 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
Using JPA 2.1 with Oracle TopLink in WebLogic Server
Applying the Patch Using OPatch
Applying the Patch Manually
Using Oracle Kodo in Oracle WebLogic Server
Using JPA 1.0 APIs
Using persistence-configuration.xml
Updating Applications to Overcome Conflicts with JPA 2.0
Using a Newer Version of OpenJPA 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
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
B
Using Oracle Kodo with Oracle WebLogic Server
Overview of Oracle Kodo
Creating an Oracle Kodo Application
Using Different Oracle Kodo Versions
Configuring Persistence
Editing the Configuration Property Files
Using the Configuration Files Together
Configuring Plug-ins
Deploying an Oracle Kodo Application
Configuring an Oracle Kodo Application
Using the Administration Console
Configuring Oracle Kodo Without Using the Administration Console
C
Oracle Kodo Persistence Configuration Schema Reference
persistence-configuration.xml Namespace Declaration and Schema Location
persistence-configuration.xml Deployment Descriptor File Structure
persistence-configuration.xml Deployment Descriptor Elements
abstract-store-broker-factory
Function
Example
access-dictionary
Function
Example
access-unloaded
Function
Example
action
Function
Example
addresses
Function
Example
advanced-sql
Function
aggregate-listeners
Function
Example
allocate
Function
Example
assert-allowed-type
Function
Example
auto-clear
Function
Example
auto-detach
Function
Example
auto-detaches
Function
Example
base-name
Function
Example
batching-operation-order-update-manager
Function
Example
buffer-size
Function
Example
cache-map
Function
Example
cache-size
Function
Example
channel
Function
Example
class-table-jdbc-seq
Function
Example
classname
Function
classpath-scan
Function
Example
clear-on-close
Function
Example
client-broker-factory
Function
Example
close-on-managed-commit
Function
Example
cluster-remote-commit-provider
Function
Example
commons-log-factory
Function
Example
compatibility
Function
Example
concurrent-hash-map
Function
Example
connection-decorators
Function
Example
connection-driver-name
Function
Example
connection-factory-mode
Function
Example
connection-factory-name
Function
Example
connection-factory-properties
Function
Example
connection-factory2-name
Function
Example
connection-factory2-properties
Function
Example
connection-password
Function
Example
connection-properties
Function
Example
connection-retain-mode
Function
Example
connection-url
Function
Example
connection-user-name
Function
Example
connection2-driver-name
Function
Example
connection2-password
Function
Example
connection2-properties
Function
Example
connection2-url
Function
Example
connection2-user-name
Function
Example
constraint-names
Function
Example
constraint-update-manager
Function
Example
copy-object-ids
Function
Example
custom-aggregate-listener
Function
Example
custom-broker-factory
Function
Example
custom-broker-impl
Function
Example
custom-class-resolver
Function
Example
custom-compatibility
Function
Example
custom-connection-decorator
Function
Example
custom-data-cache
Function
Example
custom-data-cache-manager
Function
Example
custom-detach-state
Function
Example
custom-dictionary
Function
Example
custom-driver-data-source
Function
Example
custom-filter-listener
Function
Example
custom-jdbc-listener
Function
Example
custom-lock-manager
Function
Example
custom-log
Function
Example
custom-mapping-defaults
Function
Example
custom-mapping-factory
Function
Example
custom-meta-data-factory
Function
Example
custom-meta-data-repository
Function
Example
custom-orphaned-key-action
Function
Example
custom-persistence-server
Function
Example
custom-proxy-manager
Function
Example
custom-query-compilation-cache
Function
Example
custom-remote-commit-provider
Function
Example
custom-savepoint-manager
Function
Example
custom-schema-factory
Function
Example
custom-seq
Function
Example
custom-sql-factory
Function
Example
custom-update-manager
Function
Example
data-caches
Function
Example
data-cache-manager-impl
Function
Example
data-cache-timeout
Function
Example
db2-dictionary
Function
Example
default-access-type
Function
Example
default-broker-factory
Function
Example
default-broker-impl
Function
Example
default-class-resolver
Function
Example
default-compatibility
Function
Example
default-data-cache
Function
Example
default-detach-state
Function
Example
default-data-cache-manager
Function
Example
default-driver-data-source
Function
Example
default-level
Function
Example
default-lock-manager
Function
Example
default-mapping-defaults
Function
Example
default-meta-data-factory
Function
Example
default-meta-data-repository
Function
Example
default-orphaned-key-action
Function
Example
default-proxy-manager
Function
Example
default-query-compilation-cache
Function
Example
default-savepoint-manager
Function
Example
default-schema-factory
Function
Example
default-sql-factory
Function
Example
default-update-manager
Function
Example
deprecated-jdo-mapping-defaults
Function
Example
deprecated-jdo-meta-data-factory
Function
Example
derby-dictionary
Function
Example
detach-options-all
Function
Example
detach-options-fetch-groups
Function
Example
detach-options-loaded
Function
Example
detach-state
Function
Example
detached-state-field
Function
Example
detached-state-manager
Function
Example
detached-state-transient
Function
Example
detached-new
Function
Example
diagnostic-context
Function
Example
dynamic-data-structs
Function
Example
dynamic-schema-factory
Function
Example
eager-fetch-mode
Function
Example
empress-dictionary
Function
Example
EnableLogMBean
Function
Example
EnableRuntimeMBean
Function
Example
evict-from-data-cache
Function
Example
eviction-schedule
Function
Example
exception-orphaned-key-action
Function
Example
exception-reconnect-attempts
Function
Example
execution-context-name-provider
Function
Example
export-profiling
Function
Example
extension-deprecated-jdo-mapping-factory
Function
Example
fetch-batch-size
Function
Example
fetch-direction
Function
Example
fetch-group
Function
Example
fetch-groups
Function
Example
field-override
Function
Example
file
Function
Example
file-name
Function
Example
file-schema-factory
Function
Example
files
Function
Example
filter-listeners
Function
Example
foreign-keys
Function
Example
format
Function
foxpro-dictionary
Function
Example
flush-before-queries
Function
Example
gem-fire-data-cache
Function
Example
gem-fire-data-cache-name
Function
Example
gui-jmx
Function
Example
gui-profiling
Function
Example
Host
Function
Example
host
Function
Example
hsql-dictionary
Function
Example
http-transport
Function
Example
ignore-changes
Function
Example
ignore-unmapped
Function
Example
ignore-virtual
Function
Example
in-memory-savepoint-manager
Function
Example
increment
Function
Example
indexes
Function
Example
informix-dictionary
Function
Example
initial-value
Function
Example
interval-millis
Function
Example
inverse-manager
Function
Example
jdatastore-dictionary
Function
Example
jdbc-broker-factory
Function
Example
jdbc-listeners
Function
Example
jdbc3-savepoint-manager
Function
Example
jdo-meta-data-factory
Function
Example
jms-remote-commit-provider
Function
Example
jmx
Function
Example
jmx2-jmx
Function
Example
JNDIName
Function
Example
kodo-broker
Function
Example
kodo-concurrent-data-cache
Function
Example
kodo-data-cache-manager
Function
Example
kodo-mapping-repository
Function
Example
kodo-persistence-mapping-factory
Function
Example
kodo-persistence-meta-data-factory
Function
Example
kodo-pooling-data-source
Function
Example
kodo-sql-factory
Function
Example
large-transaction
Function
Example
lazy-schema-factory
Function
Example
level
Function
Example
local-jmx
Function
Example
local-profiling
Function
Example
lock-timeout
Function
Example
log-factory-impl
Function
Example
log-orphaned-key-action
Function
Example
log4j-log-factory
Function
Example
login-timeout
Function
Example
lrs-size
Function
Example
lru-data-cache
Function
Example
manage-lru
Function
Example
mapping
Function
Example
mapping-column
Function
Example
mapping-defaults-impl
Function
Example
mapping-file-deprecated-jdo-mapping-factory
Function
Example
max-active
Function
Example
max-idle
Function
Example
max-size
Function
Example
maximize-batch-size
Function
Example
MBeanServerStrategy
Function
Example
multithreaded
Function
Example
mx4j1-jmx
Function
Example
mysql-dictionary
Function
Example
name
Function
name-column
Function
Example
NamingImpl
Function
Example
native-jdbc-seq
Function
Example
none-jmx
Function
Example
none-lock-manager
Function
Example
none-log-factory
Function
Example
none-orphaned-key-action
Function
Example
none-profiling
Function
Example
nontransactional-read
Function
Example
nontransactional-write
Function
Example
num-broadcast-threads
Function
Example
operation-order-update-manager
Function
Example
optimistic
Function
Example
oracle-dictionary
Function
Example
oracle-savepoint-manager
Function
Example
orm-file-jdor-mapping-factory
Function
Example
order-dirty-objects
Function
Example
Password
Function
Example
persistence-configuration
Function
persistence-configuration-unit
Function
pessimistic-lock-manager
Function
Example
persistence-mapping-defaults
Function
Example
populate-data-cache
Function
Example
Port
Function
Example
port
Function
Example
postgres-dictionary
Function
Example
primary-key-column
Function
Example
primary-key-value
Function
Example
primary-keys
Function
Example
profiling
Function
Example
profiling-proxy-manager
Function
Example
properties
Function
property
Function
Example
proxy-manger-impl
Function
Example
query-caches
Function
Example
quoted-numbers-in-queries
Function
Example
read-lock-level
Function
Example
recover-action
Function
Example
recovery-time-millis
Function
Example
resources
Function
Example
restore-state
Function
Example
result-set-type
Function
Example
retain-state
Function
Example
retry-class-registration
Function
Example
scan-top-down
Function
Example
schema
Function
Example
schema-column
Function
Example
schemas
Function
Example
sequence
Function
Example
sequence-column
Function
Example
sequence-name
Function
Example
ServiceURL
Function
Example
simple-driver-data-source
Function
Example
single-file
Function
Example
single-jvm-exclusive-lock-manager
Function
Example
single-jvm-remote-commit-provider
Function
Example
soft-reference-size
Function
Example
so-timeout
Function
Example
sql-server-dictionary
Function
Example
stack-execution-context-name-provider
Function
Example
store-mode
Function
Example
strict
Function
Example
strict-identity-values
Function
Example
style
Function
Example
subclass-fetch-mode
Function
Example
sybase-dictionary
Function
Example
sync-with-managed-transactions
Function
Example
synchronize-mappings
Function
Example
table
Function
Example
table-deprecated-jdo-mapping-factory
Function
Example
table-jdbc-seq
Function
Example
table-jdor-mapping-factory
Function
Example
table-lock-update-manager
Function
Example
table-name
Function
Example
table-schema-factory
Function
Example
tangosol-cache-name
Function
Example
tangosol-cache-type
Function
Example
tangosol-data-cache
Function
Example
tcp-remote-commit-provider
Function
Example
tcp-transport
Function
Example
time-seeded-seq
Function
Example
topic
Function
Example
topic-connection-factory
Function
Example
track-changes
Function
Example
transaction-isolation
Function
Example
transaction-mode
Function
Example
transaction-name-execution-context-name-provider
Function
Example
type
Function
Example
type-column
Function
Example
types
Function
Example
URL
Function
Example
url
Function
Example
urls
Function
Example
use-aliases
Function
Example
use-schema-validation
Function
Example
user-object-execution-context-name-provider
Function
Example
UserName
Function
Example
validate-false-returns-hollow
Function
Example
validate-true-checks-store
Function
Example
value-table-jdbc-seq
Function
Example
version-check-on-read-lock
Function
Example
version-check-on-write-lock
Function
Example
version-lock-manager
Function
Example
wls81-jmx
Function
Example
write-lock-level
Function
Example
Scripting on this page enhances content navigation, but does not change the content in any way.