Book Image

Learning Google Guice

By : Hussain Pithawala
Book Image

Learning Google Guice

By: Hussain Pithawala

Overview of this book

<p>Google Guice is an open source software framework for the Java platform released by Google under the Apache License. It provides support for dependency injection using annotations to configure Java objects.</p> <p>Learning Google Guice is a concise, hands-on book that covers the various areas of dependency injection using the features provided by the latest version of Google Guice. It focuses on core functionalities as well as the various extensions surrounding Guice that make it useful in other areas like web development, integration with frameworks for web development, and persistence.</p> <p>Learning Google Guice covers Guice extensions which avoid complex API usage. You will start by developing a trivial application and managing dependencies using Guice. As the book gradually progresses, you will continue adding complexity to the application while simultaneously learning how to use Guice features such as the Injector, Provider, Bindings, Scopes, and so on. Finally, you will retrofit the application for the Web, using Guice not only to manage dependencies, but also to solve configuration related problems.</p>
Table of Contents (17 chapters)
Learning Google Guice
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction to JPA 2 and Hibernate 3


Java Persistence API (JPA) is a specification for accessing, persisting, and managing data between Java objects or classes and a relational database. JPA is considered to be a standard approach for Object to Relational mapping (ORM) in Java.

JPA 2 is a work of the JSR 317 Expert Group. JPA 2 in itself is not a product, but is merely a set of interfaces which define how the persistence mechanism should work. There are a couple of open source and proprietary implementations of JPA 2 available. Hibernate, EclipseLink, and OpenJPA are prominent among them. We will be using Hibernate 3 as an implementation of the JPA 2 specification.

Hibernate is an object-relational-mapping library for java language, providing a framework for mapping an object-oriented-domain model to a relational database. Hibernate solves the problem of object-relational-impedance mismatch by replacing direct persistence-related database accesses with high-level object handling functions...