Using the Java Persistence API in Desktop Applications
Articles IndexThe JSR 220 specification defines Enterprise JavaBeans 3.0. One of its primary goals is to simplify the creation, management, and storage of entity beans. Working towards that goal, Sun Microsystems and supporting community developers created a new application programming interface (API) that lets you use “plain old Java objects" or POJOs as your persistable entities. The Java Persistence API facilitates your use of POJOs as entity beans and significantly reduces the need for complicated deployment descriptors and extra helper beans. Additionally, you can even use the API in desktop applications.
You’ll discover many reasons of your own to use the new persistence API, but here are just a few:
* You won’t have to create complex data access objects (DAO).
* The API helps you manage transactions.
* You write standards-based code that interacts with any relational database, freeing you from vendor-specific code.
* You can avoid SQL in preference to a query language that uses your class names and properties.
* You can use and manage POJOs.
* You can also use the Java Persistence API for desktop application persistence.