aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes SCBCD: Closed entity manager Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "SCBCD: Closed entity manager" Watch "SCBCD: Closed entity manager" New topic
Author

SCBCD: Closed entity manager

sandeeprajsingh tandon
Ranch Hand

Joined: Mar 06, 2009
Posts: 74
Hi,
I was going through some mock papers and also the EntityManager Api and found this surprising
getTransaction when called on a closed entity manager doesnot throw IllegalStateException, whereas most of the other methods do..even joinTransaction() (when called on a closed em)

Isnt this surprising..want to know people's opinion on why are Specs this way:???

thanks
sandeepraj
rajeswari kannan
author
Ranch Hand

Joined: Oct 01, 2006
Posts: 80
Please find the following at JPA specification 3.1.1 EntityManager Interface section.



* @throws IllegalStateException if the entity manager has
* been closed


Rajeswari Kannan Java Certification | Online Exam Software | OCAJP | OCPJP | OCEJWSD | OCEEJBD
OCEJPAD | SCJD | SCWCD | SCBCD | SCDJWS | OCMJEA | OCEJWCD | SCMAD
sandeeprajsingh tandon
Ranch Hand

Joined: Mar 06, 2009
Posts: 74
Oh, So what i refered was JPA 1.0, my bad...
Thanks for correcting me

Sandeepraj
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SCBCD: Closed entity manager