Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ejb 3.0 - persist(...) description contradiction in API spec

 
Saeed Amer
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there,

While reading ejb 3.0 persistence spec, I have come across contradicting statements (or at least this is what I believe they are). On page# 43, (3.1.1 EntityManager Interface), it says that (about "persist" operation):



While, on page#49 (Topic: 3.2.1 Persisting An Entity Instance), it says:


I am not sure what should I take from these two contradicting statements.

A 'removed' entity, as per spec, is the one that still has persistence ID, is attached to a persistence Context and is scheduled for removal from DB (so, it hasn't been actually deleted from DB).

Also, page# 49, regarding persist() in section 3.2.1, specs say:



If that is so, then how/when we'll get "Duplicate PK Exception" (whatever is the exact exception name).

I'd highly appreciate if someone can shed some light on these two things.

Many thanks in advance!
Saeed
 
Edvins Reisons
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Javadoc comments in 3.1.1 (and everywhere else in the spec) are situated above the method declaration, not below; which resolves the contradiction
 
Saeed Amer
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Edvins!
I should have paid little more attention
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic