This chapter includes the following sections:
This document is a resource for software developers who develop applications that include WebLogic Server Enterprise JavaBeans (EJBs). It is assumed that the reader is familiar with Java EE and basic EJB programming concepts.
The document mostly discusses the EJB 3.2 programming model, in particular the use of metadata annotations to simplify development. This document does not address EJB topics that are different between versions 2.x and 3.x, such as design considerations, EJB container architecture, entity beans, deployment descriptor use, and so on. This document also does not address production phase administration, monitoring, or performance tuning. For links to WebLogic Server documentation and resources for these topics, see Related Documentation.
For information on programming and packaging 2.1 EJBs, see Developing Enterprise JavaBeans, Version 2.1, for Oracle WebLogic Server.
This chapter, Introduction and Roadmap, introduces the organization of this guide.
Understanding Enterprise JavaBeans, provides an overview of the new EJB 3.1 features, as well as a brief description of the differences between EJB 3.1 and 3.0.
Simple Enterprise JavaBeans Examples, provides examples of programming EJBs using the metadata annotations specified by EJB 3.x.
Iterative Development of Enterprise JavaBeans, describes the EJB implementation process, and provides guidance for how to get an EJB up and running in WebLogic Server.
Programming the Annotated EJB Class, describes the requirements and typical steps when programming the EJB bean class that contains the metadata annotations.
Deployment Guidelines for Enterprise JavaBeans, discusses EJB-specific deployment issues and procedures.
Using an Embedded EJB Container in Oracle WebLogic Server, discusses using an embeddable EJB container in Oracle WebLogic Server.
Configuring the Persistence Provider in Oracle WebLogic Server, provides an overview of developing an Oracle TopLink application using Oracle WebLogic Server.
EJB Metadata Annotations Reference, provides reference information for the EJB 3.x metadata annotations, as well as information about standard metadata annotations that are used by EJB.
This document contains EJB 3.2-specific development information. Additionally, it provides information only for session and message-driven beans. For complete information on general EJB design and architecture, the EJB 2.x programming model (which is fully supported in EJB 3.x), see the following documents.
For information about developing and deploying EJBs with WebLogic Server, see:
Enterprise Java Beans (EJBs) in Understanding Oracle WebLogic Server.
For instructions on how to organize and build WebLogic Server EJBs in a split directory environment, see Creating a Split Development Directory Environment in Developing Applications for Oracle WebLogic Server.
For information on programming and packaging 2.x EJBs, see Developing Enterprise JavaBeans, Version 2.1, for Oracle WebLogic Server.
Deploying Applications to Oracle WebLogic Server is the primary source of information about deploying WebLogic Server applications in development and production environments.
It is assumed the reader is familiar with programming in Java EE and EJB concepts and features. To learn more about basic EJB concepts, such as the benefits of enterprise beans, the types of enterprise beans, and their life cycles, then visit the following Web sites:
Enterprise JavaBeans 3.2 Specification (JSR-345) at http://jcp.org/en/jsr/summary?id=345
The "Enterprise Beans" chapter of the Java EE 7 Tutorial at http://docs.oracle.com/javaee/7/tutorial/partentbeans.htm#BNBLR
Introducing the Java EE 6 Platform: Part 3 (EJB Technology, Even Easier to Use) at http://www.oracle.com/technetwork/articles/javaee/javaee6overview-part3-139660.html#ejbeasy
In addition to this document and the basic examples described in Simple Enterprise JavaBeans Examples,, Oracle provides comprehensive examples in the WebLogic Server distribution kit.
When you install WebLogic Server complete with the examples, the examples source code is placed in the EXAMPLES_HOME
directory. The default path is ORACLE_HOME
\wlserver\samples\server
. From this directory, you can access the source code and instruction files for the examples without having to set up the samples domain. See Sample Applications and Code Examples in Understanding Oracle WebLogic Server.
Oracle recommends that you run these examples before programming your own application that uses EJBs.
Oracle provides Java EE 7 examples that demonstrate new features in EJB 3.2, such as:
For more information, see the EJB 3.2 examples in the WebLogic Server distribution kit: EXAMPLES_HOME/examples/src/examples/javaee7/ejb
where EXAMPLES_HOME
represents the directory in which the WebLogic Server code examples are configured. See Sample Applications and Code Examples in Understanding Oracle WebLogic Server.
Oracle provides Java EE 6 examples that demonstrate new features in EJB 3.1, such as:
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
For more information, see these examples in the WebLogic Server distribution kit: EXAMPLES_HOME
/examples/src/examples/javaee6/ejb
where EXAMPLES_HOME
represents the directory in which the WebLogic Server code examples are configured. See Sample Applications and Code Examples in Understanding Oracle WebLogic Server.
There is also an EJB 3.0 persistence service example, EJB 3.1: Example of Using the Embeddable EJB Container in Java SE, that includes actual business code and provides practical instructions on how to perform key EJB 3.0 development tasks. In particular, the example demonstrates usage of EJB 3.x with:
Java Persistence API
Stateless Session Bean
Message Driven Bean
Asynchronous JavaScript based browser application
The example uses a persistent domain model for entity EJBs. For more information, see the example in the WebLogic Server distribution kit: EXAMPLES_HOME
/examples/src/examples/ejb/ejb30
where EXAMPLES_HOME
represents the directory in which the WebLogic Server code examples are configured. See Sample Applications and Code Examples in Understanding Oracle WebLogic Server.
For a comprehensive listing of the new features in EJB 3.1 features introduced in this release of WebLogic Server, see What Is New and Changed in EJB 3.2.