[jboss-user] [JBoss Microcontainer Development] New message: "Re: Profiling the dependency project"

Kabir Khan do-not-reply at jboss.com
Fri Feb 19 07:21:12 EST 2010


User development,

A new message was posted in the thread "Profiling the dependency project":

http://community.jboss.org/message/527247#527247

Author  : Kabir Khan
Profile : http://community.jboss.org/people/kabir.khan@jboss.com

Message:
--------------------------------------------------------------
Since installCallbacks and uninstallCallbacks are ConcurrentHashMaps, I think the read lock is unnecessary here in AbstractController:
 
===================================================================
--- src/main/java/org/jboss/dependency/plugins/AbstractController.java (revision 100970)
+++ src/main/java/org/jboss/dependency/plugins/AbstractController.java (working copy)
@@ -1833,17 +1833,9 @@
     */
    protected Set<CallbackItem<?>> getCallbacks(Object name, boolean isInstallPhase)
    {
-      lockRead();
-      try
-      {
-         Map<Object, Set<CallbackItem<?>>> map = (isInstallPhase ? installCallbacks : uninstallCallbacks);
-         Set<CallbackItem<?>> callbacks = map.get(name);
-         return callbacks != null ? callbacks : Collections.<CallbackItem<?>>emptySet();
-      }
-      finally
-      {
-         unlockRead();
-      }
+      Map<Object, Set<CallbackItem<?>>> map = (isInstallPhase ? installCallbacks : uninstallCallbacks);
+      Set<CallbackItem<?>> callbacks = map.get(name);
+      return callbacks != null ? callbacks : Collections.<CallbackItem<?>>emptySet();
    }
 
 

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/527247#527247




More information about the jboss-user mailing list