openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fernando Padilla <f...@alum.mit.edu>
Subject should EntityManager.refresh require active transaction? or not?
Date Thu, 23 Oct 2008 00:28:12 GMT
I am trying to use EM.refresh outside of a transaction.  But OpenJPA 
throws an exception, saying that it wants it to be within a transaction. 
  Any reason for this??


<openjpa-1.2.0-r422266:683325 nonfatal user error> 
org.apache.openjpa.persistence.TransactionRequiredException: To perform 
this operation, it must be written within a transaction, or your 
settings must allow nontransactional writes and must not detach all 
nontransactional reads.
	at 
org.apache.openjpa.kernel.BrokerImpl.assertWriteOperation(BrokerImpl.java:4400)
	at 
org.apache.openjpa.kernel.DelegatingBroker.assertWriteOperation(DelegatingBroker.java:1346)
	at 
org.apache.openjpa.persistence.EntityManagerImpl.refresh(EntityManagerImpl.java:687)

Mime
View raw message