Java Technology Home Page
A-Z Index

Java Developer Connection(SM)
Online Training

Downloads, APIs, Documentation
Java Developer Connection
Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide
 
Training Index

Writing Advanced Applications
Chapter 3: Data and Transaction Management

[<<BACK] [CONTENTS] [NEXT>>]

When you use the Enterprise JavaBeansTM architecture, data is written to and read from the database without your writing any SQL code to do it. But what if you do not want to store the data in a database, or want to write your own SQL commands, or manage transactions? You can override the built-in container-managed persistence and implement Bean-managed persistence using your own data storage and transaction management code.

Bean-managed persistence comes in useful when you want more control than the container-managed persistence provides. For example you might want to override the default of most containers to map the data in one Bean to one row in a table, implement your own finder methods, or customize caching.

This chapter presents two versions of the RegistrationBean class from Chapter 2. One version reads user data from and writes it to a file using serialized input and output streams. The other version provides its own SQL commands for reading from and writing to the database. It also explains how you can write your own transaction management code.


In a Rush?

This table links you directly to specific topics.

Topic Section
Bean-Managed Persistence and the JDBC Platform
Transaction Management
Bean-Managed finder Methods

[TOP]


[ This page was updated: 13-Oct-99 ]

Products & APIs | Developer Connection | Docs & Training | Online Support
Community Discussion | Industry News | Solutions Marketplace | Case Studies
Glossary - Applets - Tutorial - Employment - Business & Licensing - Java Store - Java in the Real World
FAQ | Feedback | Map | A-Z Index
For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-99 Sun Microsystems, Inc.
All Rights Reserved. Legal Terms. Privacy Policy.