-
Book Excerpt: JPA 101 Java Persistence Explained (15 messages)
- Posted by: Nuno Teixeira
- Posted on: March 06 2007 10:57 EST
The Java Persistence API (JPA) was introduced as part of the Java EE 5 platform to simplify the development of Java applications using data persistence and to unify the community behind a standard lightweight persistence API. This chapter, excerpted from JPA 101, focuses on the Java Persistence Query Language (JPQL). It looks at the fetch join operator and delves into JPQL's bulk operation support. The JPA specification was based on the best ideas from existing persistence technologies but now provides existing Hibernate, TopLink and Kodo customers with a standard model for object/relational mapping. JPA 101: Java Persistence Explained is a fundamentals guide to the ins and outs of JPA, the Java object/relational mapping and persistence standard for both Java SE and Java EE applications. The book covers the basics of working with the JPA, JPA annotations, Entity Manager, JPA Query Language, and tools. As you work through the tutorial, you will build a simple Maven 2 project and Hibernate object model. Read the chapter on JPQLThreaded Messages (15)
- Re: Book Excerpt: JPA 101 Java Persistence Explained by J Dev on March 06 2007 22:23 EST
- Re: Book Excerpt: JPA 101 Java Persistence Explained by Pranab Ghosh on March 07 2007 01:55 EST
- Re: Book Excerpt: JPA 101 Java Persistence Explained by Konstantin Ignatyev on March 07 2007 01:59 EST
-
Re: Book Excerpt: JPA 101 Java Persistence Explained by Amin Mohammed-Coleman on March 07 2007 05:36 EST
- Re: Book Excerpt: JPA 101 Java Persistence Explained by Amin Mohammed-Coleman on March 07 2007 06:56 EST
-
Re: Book Excerpt: JPA 101 Java Persistence Explained by Amin Mohammed-Coleman on March 07 2007 05:36 EST
- Re: Book Excerpt: JPA 101 Java Persistence Explained by Konstantin Ignatyev on March 07 2007 01:59 EST
- Why JPA Matters by Chris Maki on March 07 2007 09:31 EST
- Re: Why JPA Matters by Persistability Ltd on March 07 2007 09:53 EST
-
Re: Why JPA Matters by J Dev on March 07 2007 11:34 EST
-
Re: Why JPA Matters by Pranab Ghosh on March 07 2007 06:29 EST
-
Re: Why JPA Matters by David McCoy on March 07 2007 08:47 EST
- Re: Why JPA Matters by edem morny on March 09 2007 01:11 EST
-
Re: Why JPA Matters by Persistability Ltd on March 08 2007 06:32 EST
-
Re: Why JPA Matters by Pranab Ghosh on March 08 2007 11:26 EST
- Re: Why JPA Matters by Persistability Ltd on March 09 2007 03:35 EST
-
Re: Why JPA Matters by Pranab Ghosh on March 08 2007 11:26 EST
-
Re: Why JPA Matters by David McCoy on March 07 2007 08:47 EST
-
Re: Why JPA Matters by Pranab Ghosh on March 07 2007 06:29 EST
-
Re: Why JPA Matters by J Dev on March 07 2007 11:34 EST
- Re: Why JPA Matters by George Jiang on March 12 2007 18:00 EDT
- Re: Why JPA Matters by Persistability Ltd on March 07 2007 09:53 EST
-
Re: Book Excerpt: JPA 101 Java Persistence Explained[ Go to top ]
- Posted by: J Dev
- Posted on: March 06 2007 22:23 EST
- in response to Nuno Teixeira
Yep... JPA is gr8 though hibernate has announced JPA compatibility.. Im using hibernate in its own. not with entitymanager sudhir nimavat http://www.jyog.com -
Re: Book Excerpt: JPA 101 Java Persistence Explained[ Go to top ]
- Posted by: Pranab Ghosh
- Posted on: March 07 2007 01:55 EST
- in response to Nuno Teixeira
Will developers who left EJB for the POJO land of spring and hibernate, come back to EJB3 and JPA? -
Re: Book Excerpt: JPA 101 Java Persistence Explained[ Go to top ]
- Posted by: Konstantin Ignatyev
- Posted on: March 07 2007 01:59 EST
- in response to Pranab Ghosh
Will developers who left EJB for the POJO land of spring and hibernate, come back to EJB3 and JPA?
I thing they will leave Hibernate for iBatis :) -
Re: Book Excerpt: JPA 101 Java Persistence Explained[ Go to top ]
- Posted by: Amin Mohammed-Coleman
- Posted on: March 07 2007 05:36 EST
- in response to Konstantin Ignatyev
There has to be a major reason for me to move to EJB and I am yet to be convinced. All the features of EJB 3.0 (ranging from POJOs and interceptors) are available to be through the use of Spring and other technology stacks (mainly AOP, hibernate, acegi and so on). I was listening to a podcast where the engineers at Sun where taking about Java EE and the cool new features..but i can't help think that they are abit too late. All the features that they are talking about are already available. Ok so those aren't from Sun but does it matter? There goes my chances of getting a job at Sun :-) -
Re: Book Excerpt: JPA 101 Java Persistence Explained[ Go to top ]
- Posted by: Amin Mohammed-Coleman
- Posted on: March 07 2007 06:56 EST
- in response to Amin Mohammed-Coleman
The JPA specification was based on the best ideas from existing persistence technologies but now provides existing Hibernate, TopLink and Kodo customers with a standard model for object/relational mapping. Why? -
Why JPA Matters[ Go to top ]
- Posted by: Chris Maki
- Posted on: March 07 2007 09:31 EST
- in response to Nuno Teixeira
Great comments everyone, I would agree that some of the EJB 3.0 spec has been and is available in other frameworks, specifically Spring. However, the JPA does bring some new things to the table, most notably extended persistence contexts, the ability for a persistence context to live across multiple transactions. In addition, all JPA compliant persistence providers (Hibernate, TopLink, OpenJPA, etc.) now support a standard set of OR/M annotations so you can take your Hibernate mapping experience and apply it to TopLink without much effort. Before the JPA each provider had their own solution. I also think the JPQL is a move in the right direction. While the JPQL may not do everything HQL can do, it is a standard supported by all vendors, and many queries you may want to run day in and day out can be built upon JPQL. As for switching back to EJB3, I don't think you are going to see a lot of developers who've embraced the POJO world come back to EJB3 which is unfortunate because there are a lot of really good features in the spec and the programming model is so much simpler now. -
Re: Why JPA Matters[ Go to top ]
- Posted by: Persistability Ltd
- Posted on: March 07 2007 09:53 EST
- in response to Chris Maki
In addition, all JPA compliant persistence providers (Hibernate, TopLink, OpenJPA, etc.) now support a standard set of OR/M annotations so you can take your Hibernate mapping experience and apply it to TopLink without much effort.
apart from the fact that what is covered by JPA is a very limited subset of the mapping required by the vast majority of projects and do once you want to do something like have a List with indexes, or a real Map, then you get different behaviour between JPA implementations. Great eh? -
Re: Why JPA Matters[ Go to top ]
- Posted by: J Dev
- Posted on: March 07 2007 11:34 EST
- in response to Persistability Ltd
Currently im very much satisfied with spring, Hibernate n all my pojos. Sudhir Nimavat http://www.jyog.com -
Re: Why JPA Matters[ Go to top ]
- Posted by: Pranab Ghosh
- Posted on: March 07 2007 18:29 EST
- in response to J Dev
You might be more satisfied with Ruby and Rails. -
Re: Why JPA Matters[ Go to top ]
- Posted by: David McCoy
- Posted on: March 07 2007 20:47 EST
- in response to Pranab Ghosh
You might be more satisfied with Ruby and Rails.
How so? Does Rails support AOP? Integrate with Quartz? Integrate with pretty much every persistence technology available? Integrate with LDAP? -
Re: Why JPA Matters[ Go to top ]
- Posted by: edem morny
- Posted on: March 09 2007 01:11 EST
- in response to David McCoy
Ah. Whiles we are on POJO based frameworks, did i hear anybody mention JBoss Seam? -
Re: Why JPA Matters[ Go to top ]
- Posted by: Persistability Ltd
- Posted on: March 08 2007 06:32 EST
- in response to Pranab Ghosh
You might be more satisfied with Ruby and Rails.
A topic about Java persistence and a Ruby Glowstick accolyte chimes in. Nothing changes here. -
Re: Why JPA Matters[ Go to top ]
- Posted by: Pranab Ghosh
- Posted on: March 08 2007 23:26 EST
- in response to Persistability Ltd
Sounds like you feel threated by any thing new. No technology remains in the center stage for ever. I have been in java/j2ee world for a long time and I like it. But ruby/rails may be appropriate for relatively simpler projects. -
Re: Why JPA Matters[ Go to top ]
- Posted by: Persistability Ltd
- Posted on: March 09 2007 03:35 EST
- in response to Pranab Ghosh
Sounds like you feel threated by any thing new. No technology remains in the center stage for ever. I have been in java/j2ee world for a long time and I like it. But ruby/rails may be appropriate for relatively simpler projects.
Actually no. I like new things. I responded to your post which simply said "You might be more satisfied with Ruby and Rails". You provided no reasons why the user should feel more satisfied (nor do you here either), and so its a glib statement that adds nothing to a discussion. The thread is about persistence. If you have something to add about how persistence is handled in Ruby that provides something beneficial to how it is done in Java then why not post it ? If you dont have something to post abotu the topic of the thread why not just read ? -
Re: Why JPA Matters[ Go to top ]
- Posted by: George Jiang
- Posted on: March 12 2007 18:00 EDT
- in response to Chris Maki
However, the JPA does bring some new things to the table, most notably extended persistence contexts, the ability for a persistence context to live across multiple transactions.
Even a Hibernate 2.1 session has the ability to live across multiple transactions. So what is the fuss?