You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Jianfeng Mao <ma...@us.ibm.com> on 2008/04/24 07:19:28 UTC

AbstractStoreManager.flush() doesn't take into account of Write-locked but unchanged entities

Hi, 
I am writing a JPA provider for IBM U2 by extending the
AbstractStoreManager.  According to the OpenJPA doc and other sources such
as
http://java.sun.com/javaee/5/docs/api/javax/persistence/LockModeType.html,
the following code should force a version update on the CUSTOMER entity. But
it doesn't. Further examination of the AbstractStoreManager.flush() found
that it doesn't check if a SM requires a version update.  I am wondering if
this is by design or a overlook in implementatoin.  Please advise.

		em.getTransaction().begin();
		CUSTOMER cust = em.find(CUSTOMER.class, "9");
		em.lock(cust, LockModeType.WRITE);
		em.getTransaction().commit();

Thanks,
Jianfeng Mao

-- 
View this message in context: http://www.nabble.com/AbstractStoreManager.flush%28%29-doesn%27t-take-into-account-of-Write-locked-but-unchanged-entities-tp16842329p16842329.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.