smiley2360 wrote:
Now we're thinking about the possibilities we have if we get in troubles with the JPA API.
What makes you think of this? EJB3/JPA (and it's providers like Hibernate) are far away from EJB 1 and 2.
Quote:
1) How fare is the JPA API away from the plain old hibernate API?
Well, on the interface / API level, there it seems relative far away; but in fact, JPA is just a thin layer on Hibernate core and the main functionalities just have a simple mapping.
Quote:
2) Is it true (I mean I saw different posts to this but can't really imagine how this should go) to use EJB 3.0 JPA and the Core Hibernate API next to each other? What are the criterias to be considered and taken care for when developing / in design to use this possibilities?
I think, normally you shouldn't mix the APIs. And, generally speaking, you should use standards and not propietary APIs - King/Bauer also say this. The design question is just another thing: it depends for instance if you are using a full application server or just a web server.
Quote:
3) How would you expect the effort if we get in a show Stopper with EJB 3.0 JPA (Hibernate) to switch over to plain old Hibernate Usage without EJB 3.0 Entities? Are the differences and the necessary changes big?
You won't get a show stopper just because you decided to use JPA / EJB3. You can get show stoppers also by just using plain Hibernate - it's a question of your design and your code. And: if you get show stoppers it would be a bad idea to completely change APIs!
Anyway: JPA has a backdoor to let you use the native API of your JPA provider. EntityManager has a getDelegate method which would get you the Hibernate session. So, in some rare cases, you might ressort to this.
Quote:
4) Is there any documentation around for this beside the normal API Doc of the Core and JPA? If not does anybody have a proposal how to compare this two in my opinion not very related API's to each other to gain some feeling for the necessary changes in case of troubles?
Well, just read the Hibernate/JPA book from King/Bauer. They always describe both levels and APIs (and give you recommendations). Besides - believe it or not - Hibernate API and JPA API are very close. Remember Hibernate (and Gavin King) was one of the fathers of JPA.