Skip to main content

[jsr338-experts] Re: question regarding EntityManager.close()

  • From: Linda DeMichiel <linda.demichiel@...>
  • To: jsr338-experts@..., Christian Romberg <cromberg@...>
  • Subject: [jsr338-experts] Re: question regarding EntityManager.close()
  • Date: Mon, 18 Jun 2012 14:30:06 -0700
  • Organization: Oracle Corporation

Hi Christian,

On 6/1/2012 1:47 AM, Christian Romberg wrote:
Dear group,

The javadoc of EntityManager.close() states:

"... If this method is called when the entity manager is associated with an active 
transaction, ..."

Is my understanding right, that "active transaction" could be a 
RESOURCE_LOCAL transaction or a
JTA transaction?


Yes, your understanding is correct.

regards,

-Linda

(At first glance, I thought, that only JTA transactions are meant, but then 
it would not make sense, that
getTransaction() remains functional on a closed EntityManager, because for 
JTA transactions getTransaction()
would throw an exception, so there is obviously a reason, that "getTransaction" (along with 
"isOpen" and "getProperties")
is allowed on a closed EntityManager.)

Thank you!

Regards,

Christian

--
Christian Romberg
Chief Engineer| Versant GmbH
(T) +49 40 60990-0
(F) +49 40 60990-113
(E) cromberg@... <mailto:cromberg@...>
www.versant.com
<http://www.google.com/url?q=http%3A%2F%2Fwww.versant.com%2F&sa=D&sntz=1&usg=AFrqEzeeEBc_gN_8mxtt8xDB0tjXDXQVlw>|
www.db4o.com 
<http://www.google.com/url?q=http%3A%2F%2Fwww.db4o.com%2F&sa=D&sntz=1&usg=AFrqEzdo3Q40RwKQPBtnPIuBYQd1diFxJQ>

--
Versant
GmbH is incorporated in Germany. Company registration number: HRB
54723, Amtsgericht Hamburg. Registered Office: Halenreie 42, 22359
Hamburg, Germany. Geschäftsführer: Bernhard Wöbker, Volker John

CONFIDENTIALITY
NOTICE: This e-mail message, including any attachments, is for the sole
use of the intended recipient(s) and may contain confidential or
proprietary information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient,
immediately contact the sender by reply e-mail and destroy all copies of
the original message.





[jsr338-experts] question regarding EntityManager.close()

Christian Romberg 06/01/2012

[jsr338-experts] Re: question regarding EntityManager.close()

Linda DeMichiel 06/18/2012
 
 
Close
loading
Please Confirm
Close