User: user57
Date: 01/08/02 20:54:33
Modified: src/main/org/jboss/ejb BeanLockManager.java
Log:
o fixed class javadoc (so it would compile again)
o translated tabs -> 3 spaces
Revision Changes Path
1.4 +40 -39 jboss/src/main/org/jboss/ejb/BeanLockManager.java
Index: BeanLockManager.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/BeanLockManager.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- BeanLockManager.java 2001/08/03 02:38:50 1.3
+++ BeanLockManager.java 2001/08/03 03:54:33 1.4
@@ -1,54 +1,54 @@
/*
-* JBoss, the OpenSource EJB server
-*
-* Distributable under LGPL license.
-* See terms of license at gnu.org.
+ * JBoss, the OpenSource EJB server
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
*/
package org.jboss.ejb;
import java.util.HashMap;
+
import org.jboss.metadata.EntityMetaData;
import org.jboss.ejb.Container;
import org.jboss.tm.TxManager;
-
/**
-* Manages BeanLocks. All BeanLocks have a reference count.
-* When the reference count goes to 0, the lock is released from the
-* id -> lock mapping.
-*
-* @author <a href="[EMAIL PROTECTED]">Bill Burke</a>
-* @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
-*
-* @version $Revision: 1.3 $
-* <p><b>Revisions:</b><br>
-* <p><b>20010802: marcf</b>
-* <li>Made bean lock pluggable, container factory passes in lockClass
-* <li>Removed un-used constructor, added getters and setters
-* </ol>
+ * Manages BeanLocks. All BeanLocks have a reference count.
+ * When the reference count goes to 0, the lock is released from the
+ * id -> lock mapping.
+ *
+ * @author <a href="[EMAIL PROTECTED]">Bill Burke</a>
+ * @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
+ *
+ * @version $Revision: 1.4 $
+ * <p><b>Revisions:</b><br>
+ * <p><b>20010802: marcf</b>
+ * <ol>
+ * <li>Made bean lock pluggable, container factory passes in lockClass
+ * <li>Removed un-used constructor, added getters and setters
+ * </ol>
*/
-*
-*/
public class BeanLockManager
{
private HashMap map = new HashMap();
- // The container this manager reports to
+
+ /** The container this manager reports to */
private Container container;
- // Reentrancy of calls
+
+ /** Reentrancy of calls */
private boolean reentrant = false;
private int txTimeout = 5000;
- public Class lockClass;
+ public Class lockClass;
/**
- * getLock()
+ * returns the lock associated with the key passed. If there is
+ * no lock one is created this call also increments the number of
+ * references interested in Lock.
*
- * getLock returns the lock associated with the key passed. If there is no lock
one is created
- * this call also increments the number of references interested in Lock
- * WARNING: All access to this method MUST have an equivalent removeLockRef
cleanup call,
- * or this will create a leak in the map,
- *
+ * WARNING: All access to this method MUST have an equivalent
+ * removeLockRef cleanup call, or this will create a leak in the map,
*/
public synchronized BeanLock getLock(Object id)
{
@@ -56,13 +56,15 @@
if (lock == null)
{
try {
- lock = (BeanLock) lockClass.newInstance();
-
- lock.setId(id); lock.setReentrant(reentrant);
lock.setTimeout(txTimeout);
- }
- catch (Exception e ) {e.printStackTrace();}
-
- map.put(id, lock);
+ lock = (BeanLock) lockClass.newInstance();
+
+ lock.setId(id);
+ lock.setReentrant(reentrant);
+ lock.setTimeout(txTimeout);
+ }
+ catch (Exception e ) {e.printStackTrace();}
+
+ map.put(id, lock);
}
lock.addRef();
@@ -81,9 +83,8 @@
}
}
}
-
- public void setLockCLass(Class lockClass) {this.lockClass=lockClass;}
- public void setReentrant(boolean reentrant) {this.reentrant = reentrant;}
+ public void setLockCLass(Class lockClass) {this.lockClass=lockClass;}
+ public void setReentrant(boolean reentrant) {this.reentrant = reentrant;}
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development