This section describes the contents and organization of this guide—Programming Enterprise JavaBeans for Oracle WebLogic Server.
This document is a resource for software developers who develop applications that include WebLogic Server Enterprise JavaBeans (EJBs).
The document mostly discusses the Java EE 6-based, EJB 3.1 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.
It is assumed that the reader is familiar with Java Platform, Enterprise Edition (Java EE) Version 6 and basic EJB programming concepts.
For information on programming and packaging 2.1 EJBs, see Programming Enterprise JavaBeans, Version 2.1, for Oracle WebLogic Server.
This chapter, Chapter 1, "Introduction and Roadmap," introduces the organization of this guide.
Chapter 2, "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.
Chapter 3, "Simple Enterprise JavaBeans Examples," provides examples of programming EJBs using the metadata annotations specified by EJB 3.x.
Chapter 4, "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.
Chapter 5, "Programming the Annotated EJB Class," describes the requirements and typical steps when programming the EJB bean class that contains the metadata annotations.
Chapter 6, "Deployment Guidelines for Enterprise JavaBeans," discusses EJB-specific deployment issues and procedures.
Chapter 7, "Using an Embedded EJB Container in Oracle WebLogic Server," discusses using an embeddable EJB container in Oracle WebLogic Server.
Chapter 8, "Configuring the Persistence Provider in Oracle WebLogic Server," provides an overview of developing an Oracle TopLink application using Oracle WebLogic Server.
Appendix A, "EJB Metadata Annotations Reference," provides reference information for the EJB 3.0 metadata annotations, as well as information about standard metadata annotations that are used by EJB.
Appendix B, "Using Oracle Kodo with Oracle WebLogic Server," describes how to use Oracle Kodo to create entity beans. Oracle Kodo is a product that provides the implementation of the Java Persistence API section of the EJB 3.0 specification, as well as other persistence-related technologies such as Java Data Objects (JDO).
Note:
Oracle Kodo JPA/JDO is deprecated in this release. Customers are encouraged to use Oracle TopLink, which supports JPA 2.0. Kodo supports only JPA 1.0.
Appendix C, "Oracle Kodo Persistence Configuration Schema Reference," provides reference information for the persistence configuration schema.
This document contains EJB 3.1-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.1), see the following documents.
For information about developing and deploying EJBs with WebLogic Server, see:
"Enterprise Java Beans (EJBs)" in Introduction to Oracle WebLogic Server.
For instructions on how to organize and build WebLogic Server EJBs in a split directory environment, see Developing Applications for Oracle WebLogic Server.
For information on programming and packaging 2.x EJBs, see Programming 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 6 and EJB 3.1 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.1 Specification (JSR-318) at http://jcp.org/en/jsr/summary?id=318
The "Enterprise Beans" chapter of the Java EE 6 Tutorial at http://download.oracle.com/javaee/6/tutorial/doc/bnblr.html
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 Chapter 3, "Simple Enterprise JavaBeans Examples,", Oracle provides comprehensive examples in the WebLogic Server distribution kit.
WebLogic Server optionally installs these in WL_HOME/samples/server/examples/src/examples
, where WL_HOME
refers to the directory in which you installed WebLogic Server, such as /Oracle/Middleware/wlserver_12.1
. On Windows, you can start the examples server, and obtain information about the samples and how to run them from the WebLogic Server Start menu.
Oracle recommends that you run these examples before programming your own application that uses EJBs.
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: WL_HOME/samples/server/examples/src/examples/javaee6/ejb
.
There is also an EJB 3.0 persistence service example, EJB 3.0: Example of Invoking an Entity From A Session Bean, 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: WL_HOME/samples/server/examples/src/examples/ejb/ejb30
.
For a comprehensive listing of the new features in EJB 3.1 features introduced in this release of WebLogic Server, see "Enterprise Java Beans (EJBs)" in What’s New in Oracle WebLogic Server.