Book Image

EJB 3.0 Database Persistence with Oracle Fusion Middleware 11g

By : Deepak Vohra, Deepak Vohra
Book Image

EJB 3.0 Database Persistence with Oracle Fusion Middleware 11g

By: Deepak Vohra, Deepak Vohra

Overview of this book

EJB (Enterprise JavaBeans) 3.0 is a commonly used database persistence technology in Java EE applications. EJB 3.0 has simplified the development of EJBs with an annotations-based API that eliminates the use of remote/local interfaces, home/local home interfaces, and deployment descriptors. A number of other books are available on EJB 3.0, but none covers EJB 3.0 support in Oracle Fusion Middleware 11g, which is one of the leaders in the application server market.This is the first book that covers all aspects of EJB 3.0 database persistence development using Oracle Fusion Middleware technology. It covers all the best practices for database persistence ensuring that your applications are easily maintainable. Leaving theory behind, this book uses real-world examples to guide you in building your own EJB 3.0 applications that are well integrated with commonly used Java EE frameworks.The book gets going by discussing the new features in the EJB 3.0 specification. As some readers may still be using EJB 2.0, the book explains how to convert your EJB 2.0 entity beans to EJB 3.0. It then goes on to discuss using EJB 3.0 database persistence with JDeveloper, WebLogic Server, and Enterprise Pack for Eclipse, the main Java EE components of Oracle Fusion Middleware 11g. The book also covers EJB 3.0 relationships and integrating EJB 3.0 relationships with JSF user interfaces. EJB 3.0 database persistence with some of the commonly used frameworks such as ADF Faces, AJAX, and Web Services is also discussed in the book. It uses the integrated WebLogic Server 11g in some of the chapters and the standalone WebLogic Server in other chapters. While JDeveloper is the primary Java IDE used in the book, one of the chapters is based on the Oracle Enterprise Pack for Eclipse.By the time you reach the end of this book, you will be well-versed with developing EJB 3.0 applications using the different Java EE components of Oracle Fusion Middleware 11g.
Table of Contents (15 chapters)
EJB 3.0 Database Persistence with Oracle Fusion Middleware 11g
About the Author
About the Reviewers

Testing the web service

Next, we test the web service. Start the WebLogic server if not already started. First, we run the build-client target, which also runs the preceding targets. Subsequently, we run the run target to run the client.

Building the client

To build the client, right-click on the build.xml file and select Run Ant Target | build-client:

The EJB 3.0 classes and the web service classes get compiled, the EAR file gets deployed to the WebLogic Server, and the client gets built:

When the EAR application is deployed, the WebLogic Server and the JAX-WS runtime generate the WSDL file, which may be accessed with the given URL: http://localhost:7001/EJB3WSImpl/EJB3WSImplService?WSDL.

Select the EJB3Model project and select View | Refresh. The compiled classes for the EJB 3.0 entity and session beans, the compiled classes for the Web Service class, and the jwsc generated EJB3WSImpl.war get displayed in the Application navigator. The ejb3.jar and the ejb3webservice.ear also get displayed...