arminw 2005/06/14 06:29:42
Modified: src/java/org/apache/ojb/odmg Tag: OJB_1_0_RELEASE
TransactionImpl.java
Log:
remove redundant method to unlock objects, instead use direct calls to
LockManager
Revision Changes Path
No revision
No revision
1.59.2.18 +5 -12 db-ojb/src/java/org/apache/ojb/odmg/TransactionImpl.java
Index: TransactionImpl.java
===================================================================
RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/odmg/TransactionImpl.java,v
retrieving revision 1.59.2.17
retrieving revision 1.59.2.18
diff -u -r1.59.2.17 -r1.59.2.18
--- TransactionImpl.java 4 Jun 2005 14:38:13 -0000 1.59.2.17
+++ TransactionImpl.java 14 Jun 2005 13:29:42 -0000 1.59.2.18
@@ -412,17 +412,18 @@
{
try
{
+ LockManager lm = getImplementation().getLockManager();
Enumeration en = objectEnvelopeTable.elements();
while (en.hasMoreElements())
{
- Object obj = ((ObjectEnvelope) en.nextElement()).getObject();
- removeLock(obj);
+ ObjectEnvelope oe = (ObjectEnvelope) en.nextElement();
+ lm.releaseLock(this, oe.getIdentity(), oe.getObject());
}
//remove locks for objects which haven't been materialized yet
for (Iterator it = unmaterializedLocks.iterator(); it.hasNext();)
{
- removeLock(it.next());
+ lm.releaseLock(this, it.next());
}
// this tx is no longer interested in materialization callbacks
@@ -643,14 +644,6 @@
}
/**
- * removeLock removes the transactions lock from the Object.
- */
- private boolean removeLock(Object obj)
- {
- return getImplementation().getLockManager().releaseLock(this, obj);
- }
-
- /**
* Commit and close the transaction. Calling <code>commit</code> commits
to
* the database all persistent object modifications within the
transaction and
* releases any locks held by the transaction. A persistent object
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]