Goto Wellesley Information Services web site

The Sphere Journal

Home|Subscribe|Knowledgebase|About Us|Contact Us|Downloads

 email address 

  password 

  search 

Our Subscribers
e-Newsletters
Read a Sample Article
Helpful Resources
Renew
 

Simplify Data Access in WebSphere Application Server Applications with EJB 3.0 and the Java Persistence API: Advanced Topics

David Cook, senior architect, Ascendant Technology, LLC

July, 2009


Find out how to use the Java Persistence application programming interface (API), or JPA, as your data access framework for enterprise applications — it’s fast, portable, and easy to work with. Rational Application Developer Version 7.5 provides tools that make JPA development even easier. This article shows enterprise developers and architects working with WebSphere Application Server Version 7 how to implement multiple business interfaces and how interceptors work. It also covers persisting entity relationships and testing.

 


This is the second installment in a series of articles about developing Enterprise JavaBeans (EJB) 3.0 applications in Rational Application Developer (RAD) Version 7.5. In the first article, “ Simplify data access in WebSphere Application Server applications with EJB 3.0 and the Java Persistence API,” I introduced basic EJB 3.0-related concepts. These concepts included creating and mapping Java Persistence application programming interface (API) — also known as JPA — entity classes and using the EntityManager to create, remove, and query for entities by way of a sample application. The sample application lets you register and assign players to teams for a youth baseball organization in the fictional town of Sugarberg, Texas. I completed the basic structure of all the entity beans and one data access object (DAO) for the sample application in the previous article.

In this installment, I first show you how to complete the sample application's data layer, which involves writing all DAOs and Java Persistence Query Language (JPQL) queries for the entity beans. Then, I discuss advanced EJB 3.0 topics such as implementing multiple business interfaces, interceptors, persisting entity relationships, and JUnit testing EJB 3.0 stateless session beans in WebSphere Application Server Version 7.0.

Electronic license holders click here to access full article.

Would you like to see the full version of this and every article? Click here to subscribe.


Download The Sphere 2008
Solutions Supplement

Evaluation Guide & Checklist - How to Choose a Web Application Management Solution