openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r1354233 - /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AuditManager.java
Date Tue, 26 Jun 2012 21:04:13 GMT
Author: ppoddar
Date: Tue Jun 26 21:04:12 2012
New Revision: 1354233

URL: http://svn.apache.org/viewvc?rev=1354233&view=rev
Log:
OPENJPA-2030: Add support to detect dirty outside transaction

Modified:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AuditManager.java

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AuditManager.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AuditManager.java?rev=1354233&r1=1354232&r2=1354233&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AuditManager.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AuditManager.java
Tue Jun 26 21:04:12 2012
@@ -246,7 +246,7 @@ public class AuditManager extends InMemo
 		AuditCallback(Broker broker) {
 			_broker = broker;
 		}
-
+		
 		void audit() {
 			if (_audits.isEmpty()) return;
 			Collection<Audited> news = new HashSet<Audited>();
@@ -327,6 +327,7 @@ public class AuditManager extends InMemo
 
 		@Override
 		public void beforeStore(LifecycleEvent event) {
+			save(AuditableOperation.UPDATE, event);
 		}
 
 		@Override
@@ -347,8 +348,9 @@ public class AuditManager extends InMemo
 
 		@Override
 		public void afterDirty(LifecycleEvent event) {
+			save(AuditableOperation.UPDATE, event);
 		}
-
+		
 		@Override
 		public void beforeDirtyFlushed(LifecycleEvent event) {
 		}
@@ -371,6 +373,7 @@ public class AuditManager extends InMemo
 
 		@Override
 		public void afterAttach(LifecycleEvent event) {
+			save(AuditableOperation.UPDATE, event);
 		}
 		
 	}



Mime
View raw message