Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 74584

The Java Persistence API (JPA) is a Java specification for accessing, persisting, and managing data between Java objects/classes and a relational database. It is part of the EJB 3.0 specification and is the industry standard approach for Object to Relational Mapping (ORM).

4 votes

Is staying implementation agnostic really worth it?

From my experience: no, it is not worth it in case of JPA/Hibernate. Is "programming to the interface" worth it when it comes to stuff like JPA? … I see no point of swapping Hibernate with another JPA-compliant ORM. Have you ever been able to completely avoid the abstraction from something like JPA leaking anyways? No. …
scriptin's user avatar
  • 4,432
0 votes
Accepted

Can I ditch the persistence.xml file on JBoss?

Yes, you can go without persistence.xml, since it is not required to use JPA at all to run your application in Java EE container. … So, for example, Spring may or may not be JPA-compliant, not your application using Spring. Your application just may or may not use JPA features. …
scriptin's user avatar
  • 4,432