This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Tutorial that covers EJB CMP/CMR and EJB-QL  RSS feed

Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Enterprise JavaBeans (EJB) 2.0 extends the earlier version 1.1 by adding advanced support for EntityBeans..."
"Once you get the hang of CMP/CMR, it is faster to write EntityBeans using this technology, than using low-level JDBC inside of bean-managed persistence (BMP) beans . "
" do not have to write low-level JDBC calls, and you do not have to write code to manage relationships. It is all built into the EJB framework. Your interface to relationships is through the pervasive java.util.Collection and java.util.Set which most EJB developers are already familiar with."
"EJB 2.0 added a lot of features and functionality, this tutorial focuses on CMP/CMR. Thus, this tutorial assumes you have a background with EJB, and EntityBeans. You don't have to be an EJB expert to follow along. The tutorials cover local interfaces, deployment descriptor CMP, CMR fields, and relationship elements. I will also cover the full range of relationship types as follows:
One-to-one One-to-many Many-to-many
The relationships in the example also cover both unidirectional support and bidirectional support. The relationships are defined in XML deployment descriptors.
In the first tutorial, you get a taste of CMP/CMR and EJB-QL, then I will delve into an example of a simple EJB 2.0 style CMP EntityBean. Part of the example demonstrates simple EJB-QL to create a finder method without a Java implementation. This tutorial is just to get you acclimated to the terminology and technology and it adds a teaser example. The next part, the second tutorial, does the heavy lifting.
In the second tutorial, I will build on the first example to eventually cover each type of relationship and each type of direction (both unidirectional and bidirectional form). Each example also has a client that demonstrates accessing the relationships to add, remove, and change related members. Lastly, cascade-delete is demonstrated with consequences for both the one-to-one relationship example and the one-to-many relationship.
In the third tutorial, I will demonstrate advance EJB-QL to build finder and select methods. This tutorial uses the relationships I built in the last tutorial to show the ends and outs of EJB-QL.
"Each example includes source code as follows: Deployment Descriptor, Implementation class files, Interface class files, Home Interface class files, and an Ant build script. For these examples I will use the J2EE reference implementation which ships with Cloudscape RDBMS system." ion.nsf/webservices-onlinecourse-bytitle/B6C04F7C5DB8A7ED86256B65004AD53E?OpenDocument

If you like this free tutorial on IBM developerWorks. Perhaps you will like my new book
Java Tools for Extreme Programming
--Rick Hightower
[ March 13, 2002: Message edited by: Rick Hightower ]
What's that smell? I think this tiny ad may have stepped in something.
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!