Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Book excerpt: Migrate to the Java Persistence API

Until the publication of the Enterprise JavaBeans 3.0 specification and the Java Persistence API, the only persistence technology officially part of the Java Enterprise Edition platform (Java EE is Sun's new name for J2EE) was container-managed persistenc

Tutorial Details:

Ever since they were first required to be supported in EJB 1.1, entity beans have been criticized as being both too complex and lacking in features to handle the persistence requirements of real-world applications. But standards matter in the enterprise, so despite the availability of proven object-relational mapping solutions, both commercial and open source, companies have always found a way to work around the entity bean shortcomings and get the job done. As a result, there is a large installed base of applications based on CMP entity beans, and bringing them forward into the next generation of Java EE standards may be a task worth pursuing.

The complexity of entity beans lies not in the concept but in the implementation. Like session beans, entity beans are true EJB components, with separate classes for the bean implementation, home interface, and business interfaces. Entity beans also require a verbose XML deployment descriptor that describes the persistent properties of the bean, container-managed relationships between entities, and the EJB QL (query language) queries used to access the entities. Finally, many of the entity bean details require vendor-specific configuration to deploy and run. In response to these issues, the Java Persistence API offers a programming model that is easier to use, while offering a larger feature set with less vendor-specific configuration.

The challenge in moving from entity beans to entities is not the entity beans themselves. However complex they are to implement, they are relatively straightforward to use. The problem with entity beans is that the public API they expose is tightly coupled to the component model on which they are based. The principal issue facing any migration is the extent and manner in which application code interacts with entity bean interfaces. The more code that uses entity beans, the harder it is to migrate.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Book excerpt: Migrate to the Java Persistence API

View Tutorial:
Book excerpt: Migrate to the Java Persistence API

Related Tutorials:

Java in a Nutshell Code Example
The Java programming examples shown here are from the book Java in a Nutshell , by David Flanagan, published by O\'Reilly & Associates.
 
A portable hill of beans
A portable hill of beans
 
Java Tip 74: Build dynamically extensible frameworks - JavaWorld
Java Tip 74: Build dynamically extensible frameworks - JavaWorld
 
Read all about EJB 2.0 - JavaWorld June 2000
Read all about EJB 2.0 - JavaWorld June 2000
 
Which JSP book serves up the best lesson?
Which JSP bookAs for Web servers/databases, just mentioning a server in the book is not sufficient to be listed here.
 
Printing in Java, Part 1 - JavaWorld October 2000
Printing in Java, Part 1 - JavaWorld October 2000
 
Master Java with these introductory books - JavaWorld May 2001
Master Java with these introductory books - JavaWorld May 2001
 
Good introduction to JDO
Good introduction to JDO
 
Comparison between the two major JDO architectures
Comparison between the two major JDO architectures
 
Java tools reign supreme - JavaWorld celebrates the leading Java tools
Java tools reign supreme - JavaWorld celebrates the leading Java tools
 
Smart Value Object goes one step further
Smart Value Object goes one step further The Smart Value Object allows server components to track client-side modification of business objects in a rich client/J2EE server environment, by using the latest features offered by bytecode processing tools.
 
PGP Java API 2.0
PGP Java API 2.0
 
Creating Varargs in Java 1.5 Tiger
Creating Varargs in Java 1.5 Tiger In this excerpt from Chapter 5 of the book, Brett and David cover how to create and iterate over variable-length argument lists (better known as varargs), which will have you writing better, cleaner, more flexible code
 
Core Java Data Objects Excerpt
This book excerpt is from Core Java Data Objects,
 
An Introduction to Java Object Persistence with EJB
The 'impedance mismatch' between relational databases' tabular orientation and object-oriented Java's hierarchical one is a perennial problem for which the Java world has several good solution offerings. This article, the first in a three-part series, wil
 
Simple Object Persistence with the db4o Object Database
Simple Object Persistence with the db4o Object Database. db4o has been chosen for applications in embedded systems in which zero administration, reliability, and low footprint are critical features. In Germany, BMW Car IT, for example, uses it in an embed
 
Excellent Guide to Java / Databases, JDBC
JDBC is a Java API for executing SQL statements. Start here, Examples Central Sites Related Sites, Link Collections Tutorials, FAQs, References Company Newsgroups Mailing Lists, General Articles, Special Articles, Interoperability Books util
 
The SATSA Developer's Guide
Describes how to use the SATSA APIs in MIDP applications. It includes lucid explanations and example code that illustrate how to communicate with a smart card and how to use cryptographic services. It is based on the SATSA Reference Implementation 1.0.
 
Streaming QuickTime with Java
This isn't an excerpt from my soon-to-be-released QuickTime for Java book, though now I wish it was.
 
What is Persistence Framework?
What is Persistence Framework? What is Persistence Framework? A persistence framework moves the program data in its most natural form (in memory objects) to and from a permanent data store the database. The persistence framework manages the
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.