openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jianfeng Mao <m...@us.ibm.com>
Subject AbstractStoreManager.flush() doesn't take into account of Write-locked but unchanged entities
Date Thu, 24 Apr 2008 05:19:28 GMT

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.


Mime
View raw message