ABOUT THIS BOOK Code annotations accompany many of the source code listings.highlighting important concepts.In some cases,numbered bullets link to explanations that fol low the listing. Hibernate is an open source project released under the Lesser GNU Public License.Directions for downloading Hibernate,in source or binary form,are available from the Hibernate web site:www.hibernate.org/. The source code for all CaveatEmptor examples in this book is available from http://caveatemptor.hibernate.org/.The CaveatEmptor example application code is available on this web site in different flavors:for example,for servlet and for EJB deployment,with or without a presentation layer.However,only the standal one persistence layer source package is the recommended companion to this book. About the authors Christian Bauer is a member of the Hibernate developer team and is also respon sible for the Hibernate web site and documentation.Christian is interested in rela- tional database systems and sound data management in Java applications.He works as a developer and consultant for JBoss Inc.and lives in Frankfurt,Germany. Gavin King is the founder of the Hibernate project and lead developer.He is an enthusiastic proponent of agile development and open source software.Gavin is helping integrate ORM technology into the J2EE standard as a member of the EJB 3 Expert Group.He is a developer and consultant for JBoss Inc.,based in Mel bourne,Australia
ABOUT THIS BOOK xix Code annotations accompany many of the source code listings, highlighting important concepts. In some cases, numbered bullets link to explanations that follow the listing. Hibernate is an open source project released under the Lesser GNU Public License. Directions for downloading Hibernate, in source or binary form, are available from the Hibernate web site: www.hibernate.org/. The source code for all CaveatEmptor examples in this book is available from http://caveatemptor.hibernate.org/. The CaveatEmptor example application code is available on this web site in different flavors: for example, for servlet and for EJB deployment, with or without a presentation layer. However, only the standalone persistence layer source package is the recommended companion to this book. About the authors Christian Bauer is a member of the Hibernate developer team and is also responsible for the Hibernate web site and documentation. Christian is interested in relational database systems and sound data management in Java applications. He works as a developer and consultant for JBoss Inc. and lives in Frankfurt, Germany. Gavin King is the founder of the Hibernate project and lead developer. He is an enthusiastic proponent of agile development and open source software. Gavin is helping integrate ORM technology into the J2EE standard as a member of the EJB 3 Expert Group. He is a developer and consultant for JBoss Inc., based in Melbourne, Australia. Licensed to Jose Carlos Romero Figueroa <jose.romero@galicia.seresco.es>
about Hibernate3 and ElB 3 The world doesn't stop turning when you finish writing a book,and getting the book into production takes more time than you could believe.Therefore,some of the information in any technical book becomes quickly outdated,especially when new standards and product versions are already n the horizon. Hibernate3.an evolutionary new version of Hibernate,was in the early stages of planning and design while this book was being written.By the time the book hits the shelves,there may be an alpha release available.However,the informa- tion in this book is valid for Hibernate3:in fact.we consider it to be an essential reference even for the new version.We discuss fundamental concepts that will be found in Hibernate3 and in most ORM solutions.Furthermore,Hibernate3 will be mostly backward compatible with Hibernate 2.1.New features will be added.of course,but you won't have problems picking them up after reading this book Inspired by the success of Hibernate,the EJB 3 Expert Group used several key concepts and APIs from Hibernate in its redesign ofentity beans.At the time of writ ing.only an early draft of the new EB specification was available:hence we don discuss it in this book.However,after reading Hibernate in Action,you'll know all the fundamentals that will let you quickly understand entity beans in EJB 3. For more up-to-date information,see the Hibernate road map:www.hiber nate.org/About/RoadMap
xx about Hibernate3 and EJB 3 The world doesn’t stop turning when you finish writing a book, and getting the book into production takes more time than you could believe. Therefore, some of the information in any technical book becomes quickly outdated, especially when new standards and product versions are already on the horizon. Hibernate3, an evolutionary new version of Hibernate, was in the early stages of planning and design while this book was being written. By the time the book hits the shelves, there may be an alpha release available. However, the information in this book is valid for Hibernate3; in fact, we consider it to be an essential reference even for the new version. We discuss fundamental concepts that will be found in Hibernate3 and in most ORM solutions. Furthermore, Hibernate3 will be mostly backward compatible with Hibernate 2.1. New features will be added, of course, but you won’t have problems picking them up after reading this book. Inspired by the success of Hibernate, the EJB 3 Expert Group used several key concepts and APIs from Hibernate in its redesign of entity beans. At the time of writing, only an early draft of the new EJB specification was available; hence we don’t discuss it in this book. However, after reading Hibernate in Action, you’ll know all the fundamentals that will let you quickly understand entity beans in EJB 3. For more up-to-date information, see the Hibernate road map: www.hibernate.org/About/RoadMap. Licensed to Jose Carlos Romero Figueroa <jose.romero@galicia.seresco.es>
author online Purchase ofenn inhid frea private web forum whe point your web brow r to www.manning.com/bauer.This page provides informa n on how to get on the forum once you are registered,what kind of help is avail able,and the rules of conduct on the forum.It also provides links to the source code for the examples in the book,errata,and other downloads. Manning's commitment to our readers is to provide a venue where a mean- ingful dialog between individual readers and between readers and the authors can take place.It is not a commitment to any specific amount of participation on the part of the authors,whose contribution to the AO remains voluntary (and unpaid).We suggest you try asking the authors some challenging questions lest their interest stray!
xxi author online Purchase of Hibernate in Action includes free access to a private web forum where you can make comments about the book, ask technical questions, and receive help from the author and from other users. To access the forum and subscribe to it, point your web browser to www.manning.com/bauer. This page provides information on how to get on the forum once you are registered, what kind of help is available, and the rules of conduct on the forum. It also provides links to the source code for the examples in the book, errata, and other downloads. Manning’s commitment to our readers is to provide a venue where a meaningful dialog between individual readers and between readers and the authors can take place. It is not a commitment to any specific amount of participation on the part of the authors, whose contribution to the AO remains voluntary (and unpaid). We suggest you try asking the authors some challenging questions lest their interest stray! Licensed to Jose Carlos Romero Figueroa <jose.romero@galicia.seresco.es>
about the title and cover By combining introductions,overviews,and how-to examples,Manning's In Action books are designed to help learning and remembering.According to research in cognitive science,the things people remember are things they discover during self-motivated exploration Although no one at Manning is a cognitive scientist,we are convinced that for learning to become permanent it must pass through stages of exploration,play and,interestingly,re-telling of what is being learned.People understand and remember new things.which is to say they master them.only after actively explor- ing them.Humans learn in action.An essential part of an In Action guide is that it is example-driven.It encourages the reader to try things out,to play with new code,and explore new ideas. There is another,more mundane,reason for the title of this book:our readers are busy.They use books to do a job or solve a problem.They need books that allow them tojump in and jump out easily and learn just what they want,just when they want it.They need books that aid them in action.The books in this series are designed for such readers. About the cover illustration The figure on the cover of Hibernate in Action is a peasant woman from a village in Switzerland,"Paysanne de Schwatzenbourg en Suisse."The illustration is taken from a French travel book,Encyclopedie des Voyages by J.G.St.Saveur,published in 1796.Travel for pleasure was a relatively new phenomenon at the time and travel guides such as this one were popular,introducing both the tourist as well as the armchair traveler,to the inhabitants of other regions of France and abroad. xxii
xxii about the title and cover By combining introductions, overviews, and how-to examples, Manning’s In Action books are designed to help learning and remembering. According to research in cognitive science, the things people remember are things they discover during self-motivated exploration. Although no one at Manning is a cognitive scientist, we are convinced that for learning to become permanent it must pass through stages of exploration, play, and, interestingly, re-telling of what is being learned. People understand and remember new things, which is to say they master them, only after actively exploring them. Humans learn in action. An essential part of an In Action guide is that it is example-driven. It encourages the reader to try things out, to play with new code, and explore new ideas. There is another, more mundane, reason for the title of this book: our readers are busy. They use books to do a job or solve a problem. They need books that allow them to jump in and jump out easily and learn just what they want, just when they want it. They need books that aid them in action. The books in this series are designed for such readers. About the cover illustration The figure on the cover of Hibernate in Action is a peasant woman from a village in Switzerland, “Paysanne de Schwatzenbourg en Suisse.” The illustration is taken from a French travel book, Encyclopedie des Voyages by J. G. St. Saveur, published in 1796. Travel for pleasure was a relatively new phenomenon at the time and travel guides such as this one were popular, introducing both the tourist as well as the armchair traveler, to the inhabitants of other regions of France and abroad. Licensed to Jose Carlos Romero Figueroa <jose.romero@galicia.seresco.es>
ABOUT THE TITLE AND COVER The diversity of the drawings in the Encyclopedie des Vayagesspeaks vividly of the uniqueness and individuality of the world's towns and provinces just 200 years ago.This was a time when the dress codes of two regions separated by a few dozen miles identified people uniquely as belonging to one or the other.The travel guide brings to life a sense of isolation and distance of that period and of every other historic period except our own hyperkinetic present. Dress codes have changed since then and the diversity by region,so rich at the time.has faded away.It is now often hard to tell the inhabitant of one continent from another.Perhaps,trying to view it optimistically,we have traded a cultural and visual diversity for a more varied personal life.Or a more varied and interest ing intellectual and technical life. We at Manning celebrate the inventiveness,the initiative,and the fun of the computer business with book covers based on the rich diversity of regional life two centuries ago brought back to life by the pictures from this travel book
ABOUT THE TITLE AND COVER xxiii The diversity of the drawings in the Encyclopedie des Voyages speaks vividly of the uniqueness and individuality of the world’s towns and provinces just 200 years ago. This was a time when the dress codes of two regions separated by a few dozen miles identified people uniquely as belonging to one or the other. The travel guide brings to life a sense of isolation and distance of that period and of every other historic period except our own hyperkinetic present. Dress codes have changed since then and the diversity by region, so rich at the time, has faded away. It is now often hard to tell the inhabitant of one continent from another. Perhaps, trying to view it optimistically, we have traded a cultural and visual diversity for a more varied personal life. Or a more varied and interesting intellectual and technical life. We at Manning celebrate the inventiveness, the initiative, and the fun of the computer business with book covers based on the rich diversity of regional life two centuries ago brought back to life by the pictures from this travel book. Licensed to Jose Carlos Romero Figueroa <jose.romero@galicia.seresco.es>