You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2005/04/12 15:47:58 UTC
svn commit: r161050 -
lenya/trunk/src/java/org/apache/lenya/transaction/UnitOfWorkImpl.java
Author: andreas
Date: Tue Apr 12 06:47:57 2005
New Revision: 161050
URL: http://svn.apache.org/viewcvs?view=rev&rev=161050
Log:
unit of work: check in all involved resources, not only the changed ones
Modified:
lenya/trunk/src/java/org/apache/lenya/transaction/UnitOfWorkImpl.java
Modified: lenya/trunk/src/java/org/apache/lenya/transaction/UnitOfWorkImpl.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/transaction/UnitOfWorkImpl.java?view=diff&r1=161049&r2=161050
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/transaction/UnitOfWorkImpl.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/transaction/UnitOfWorkImpl.java Tue Apr 12 06:47:57 2005
@@ -131,19 +131,17 @@
t.deleteTransactionable();
}
- for (Iterator i = involvedObjects.iterator(); i.hasNext();) {
- Transactionable t = (Transactionable) i.next();
- if (t.isCheckedOut()) {
- t.checkin();
- }
- }
-
if (getIdentityMap() != null) {
Identifiable[] objects = getIdentityMap().getObjects();
for (int i = 0; i < objects.length; i++) {
- if (objects[i] instanceof Transactionable
- && ((Transactionable) objects[i]).isLocked()) {
- ((Transactionable) objects[i]).unlock();
+ if (objects[i] instanceof Transactionable) {
+ Transactionable t = (Transactionable) objects[i];
+ if (t.isCheckedOut()) {
+ t.checkin();
+ }
+ if (t.isLocked()) {
+ t.unlock();
+ }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org