wood burning stoves 2.0*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 70
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: 70
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
 
Similar Threads
find and getReference methods
Problem javax.persistence.NoResultException: No entity found for query
JTA Transaction Mangement
EntityManagerFactory vs EntityManager
Persistence Context propagation doubt