diff --git a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/Configuration.java b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/Configuration.java
index 839aa80..7bc34ac 100644
--- a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/Configuration.java
+++ b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/Configuration.java
@@ -23,16 +23,14 @@
 
 import org.apache.felix.eventadmin.impl.adapter.*;
 import org.apache.felix.eventadmin.impl.dispatch.DefaultThreadPool;
-import org.apache.felix.eventadmin.impl.dispatch.ThreadPool;
 import org.apache.felix.eventadmin.impl.handler.*;
-import org.apache.felix.eventadmin.impl.security.*;
+import org.apache.felix.eventadmin.impl.security.SecureEventAdminFactory;
 import org.apache.felix.eventadmin.impl.util.LeastRecentlyUsedCacheMap;
 import org.apache.felix.eventadmin.impl.util.LogWrapper;
 import org.osgi.framework.*;
 import org.osgi.service.cm.ConfigurationException;
 import org.osgi.service.cm.ManagedService;
 import org.osgi.service.event.EventAdmin;
-import org.osgi.service.event.TopicPermission;
 import org.osgi.service.metatype.MetaTypeProvider;
 
 
@@ -124,9 +122,9 @@
     private String[] m_ignoreTimeout;
 
     // The thread pool used - this is a member because we need to close it on stop
-    private volatile ThreadPool m_sync_pool;
+    private volatile DefaultThreadPool m_sync_pool;
 
-    private volatile ThreadPool m_async_pool;
+    private volatile DefaultThreadPool m_async_pool;
 
     // The actual implementation of the service - this is a member because we need to
     // close it on stop. Note, security is not part of this implementation but is
@@ -134,9 +132,6 @@
     // the wrapper).
     private volatile EventAdminImpl m_admin;
 
-    // This is the service factory for the event admin with the security impl
-    private volatile SecureEventAdminFactory m_secure_admin;
-
     // The registration of the security decorator factory (i.e., the service)
     private volatile ServiceRegistration m_registration;
 
@@ -299,12 +294,6 @@
         LogWrapper.getLogger().log(LogWrapper.LOG_DEBUG,
             PROP_REQUIRE_TOPIC + "=" + m_requireTopic);
 
-        final TopicPermissions publishPermissions = new CacheTopicPermissions(
-            new LeastRecentlyUsedCacheMap(m_cacheSize), TopicPermission.PUBLISH);
-
-        final TopicPermissions subscribePermissions = new CacheTopicPermissions(
-            new LeastRecentlyUsedCacheMap(m_cacheSize), TopicPermission.SUBSCRIBE);
-
         final TopicHandlerFilters topicHandlerFilters =
             new CacheTopicHandlerFilters(new LeastRecentlyUsedCacheMap(m_cacheSize),
             m_requireTopic);
@@ -339,8 +328,7 @@
         // Note that blacklisting is deactivated by selecting a different scheduler
         // below (and not in this HandlerTasks object!)
         final HandlerTasks handlerTasks = new BlacklistingHandlerTasks(m_bundleContext,
-            new CleanBlackList(), topicHandlerFilters, filters,
-            subscribePermissions);
+            new CleanBlackList(), topicHandlerFilters, filters);
 
         if ( m_admin == null )
         {
@@ -348,19 +336,16 @@
 
             // Finally, adapt the outside events to our kind of events as per spec
             adaptEvents(m_admin);
-            // create secure admin factory which is a service factory
-            m_secure_admin = new SecureEventAdminFactory(m_admin, publishPermissions);
 
             // register the admin wrapped in a service factory (SecureEventAdminFactory)
             // that hands-out the m_admin object wrapped in a decorator that checks
             // appropriated permissions of each calling bundle
             m_registration = m_bundleContext.registerService(EventAdmin.class.getName(),
-                    m_secure_admin, null);
+                    new SecureEventAdminFactory(m_admin), null);
         }
         else
         {
             m_admin.update(handlerTasks, m_timeout, m_ignoreTimeout);
-            m_secure_admin.update(publishPermissions);
         }
 
     }
diff --git a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/EventAdminImpl.java b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/EventAdminImpl.java
index 887c228..45cb91f 100644
--- a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/EventAdminImpl.java
+++ b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/EventAdminImpl.java
@@ -18,7 +18,7 @@
  */
 package org.apache.felix.eventadmin.impl;
 
-import org.apache.felix.eventadmin.impl.dispatch.ThreadPool;
+import org.apache.felix.eventadmin.impl.dispatch.DefaultThreadPool;
 import org.apache.felix.eventadmin.impl.handler.HandlerTasks;
 import org.apache.felix.eventadmin.impl.tasks.*;
 import org.osgi.service.event.Event;
@@ -60,8 +60,8 @@
      * @param asyncPool The asynchronous thread pool
      */
     public EventAdminImpl(final HandlerTasks managers,
-            final ThreadPool syncPool,
-            final ThreadPool asyncPool,
+            final DefaultThreadPool syncPool,
+            final DefaultThreadPool asyncPool,
             final int timeout,
             final String[] ignoreTimeout)
     {
diff --git a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/dispatch/DefaultThreadPool.java b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/dispatch/DefaultThreadPool.java
index c809e37..61877db 100644
--- a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/dispatch/DefaultThreadPool.java
+++ b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/dispatch/DefaultThreadPool.java
@@ -22,13 +22,13 @@
 import EDU.oswego.cs.dl.util.concurrent.*;
 
 /**
- * The DefaultThreadPool class implements the {@link ThreadPool} interface.
+ * A thread pool that allows to execute tasks using pooled threads in order
+ * to ease the thread creation overhead.
  *
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
 public class DefaultThreadPool
     extends PooledExecutor
-    implements ThreadPool
 {
 
     /**
@@ -73,7 +73,7 @@
     }
 
     /**
-     * @see org.apache.felix.eventadmin.impl.dispatch.ThreadPool#configure(int)
+     * Configure a new pool size.
      */
     public void configure(final int poolSize)
     {
@@ -82,7 +82,8 @@
     }
 
     /**
-     * @see org.apache.felix.eventadmin.impl.dispatch.ThreadPool#close()
+     * Close the pool i.e, stop pooling threads. Note that subsequently, task will
+     * still be executed but no pooling is taking place anymore.
      */
     public void close()
     {
@@ -99,7 +100,8 @@
     }
 
     /**
-     * @see org.apache.felix.eventadmin.impl.dispatch.ThreadPool#executeTask(java.lang.Runnable)
+     * Execute the task in a free thread or create a new one.
+     * @param task The task to execute
      */
     public void executeTask(Runnable task)
     {
diff --git a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/dispatch/ThreadPool.java b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/dispatch/ThreadPool.java
deleted file mode 100644
index d35c050..0000000
--- a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/dispatch/ThreadPool.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.eventadmin.impl.dispatch;
-
-
-/**
- * A ThreadPool interface that allows to execute tasks using pooled threads in order
- * to ease the thread creation overhead and additionally, to associate a callback
- * with the thread that executes the task. Subsequently, the callback for a given
- * thread can be asked from instances of this class. Finally, the currently executed
- * task of a thread created by this pool can be retrieved as well. The look-up
- * methods accept plain thread objects and will return given default values in case
- * that the specific threads have not been created by this pool. Note that a closed
- * pool should still execute new tasks but stop pooling threads.
- *
- * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
- */
-public interface ThreadPool
-{
-    /**
-     * Execute the task in a free thread or create a new one. The given callback
-     * will be associated with the executing thread as long as it is executed.
-     *
-     * @param task The task to execute
-     */
-    void executeTask(final Runnable task);
-
-    /**
-     * Close the pool i.e, stop pooling threads. Note that subsequently, task will
-     * still be executed but no pooling is taking place anymore.
-     */
-    void close();
-
-    /** Configure a new pool size. */
-    void configure(int poolSize);
-}
diff --git a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/handler/BlacklistingHandlerTasks.java b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/handler/BlacklistingHandlerTasks.java
index 25d1440..bf3c265 100644
--- a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/handler/BlacklistingHandlerTasks.java
+++ b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/handler/BlacklistingHandlerTasks.java
@@ -21,16 +21,12 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.felix.eventadmin.impl.security.TopicPermissions;
+import org.apache.felix.eventadmin.impl.security.PermissionsUtil;
 import org.apache.felix.eventadmin.impl.tasks.HandlerTask;
 import org.apache.felix.eventadmin.impl.tasks.HandlerTaskImpl;
 import org.apache.felix.eventadmin.impl.util.LogWrapper;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.InvalidSyntaxException;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.event.Event;
-import org.osgi.service.event.EventConstants;
-import org.osgi.service.event.EventHandler;
+import org.osgi.framework.*;
+import org.osgi.service.event.*;
 
 /**
  * This class is an implementation of the HandlerTasks interface that does provide
@@ -59,9 +55,6 @@
     // event handler is interested in a particular event
     private final Filters m_filters;
 
-    // Used to create and possibly cache topic permissions
-    private final TopicPermissions m_topicPermissions;
-
     /**
      * The constructor of the factory.
      *
@@ -69,18 +62,15 @@
      * @param blackList The set to use for keeping track of blacklisted references
      * @param topicHandlerFilters The factory for topic handler filters
      * @param filters The factory for <tt>Filter</tt> objects
-     * @param topicPermissions The factory for permission objects of type PUBLISH
      */
     public BlacklistingHandlerTasks(final BundleContext context,
         final BlackList blackList,
-        final TopicHandlerFilters topicHandlerFilters, final Filters filters,
-        final TopicPermissions topicPermissions)
+        final TopicHandlerFilters topicHandlerFilters, final Filters filters)
     {
         checkNull(context, "Context");
         checkNull(blackList, "BlackList");
         checkNull(topicHandlerFilters, "TopicHandlerFilters");
         checkNull(filters, "Filters");
-        checkNull(topicPermissions, "TopicPermissions");
 
         m_context = context;
 
@@ -89,8 +79,6 @@
         m_topicHandlerFilters = topicHandlerFilters;
 
         m_filters = filters;
-
-        m_topicPermissions = topicPermissions;
     }
 
     /**
@@ -129,14 +117,13 @@
         {
             if (!m_blackList.contains(handlerRefs[i])
                 && handlerRefs[i].getBundle().hasPermission(
-                    m_topicPermissions.createTopicPermission(event.getTopic())))
+                        PermissionsUtil.createSubscribePermission(event.getTopic())))
             {
                 try
                 {
                     if (event.matches(m_filters.createFilter(
                         (String) handlerRefs[i]
-                            .getProperty(EventConstants.EVENT_FILTER),
-                        Filters.TRUE_FILTER)))
+                            .getProperty(EventConstants.EVENT_FILTER))))
                     {
                         result.add(new HandlerTaskImpl(handlerRefs[i],
                             event, this));
diff --git a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/handler/CacheFilters.java b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/handler/CacheFilters.java
index f0612b0..8f04cb4 100644
--- a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/handler/CacheFilters.java
+++ b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/handler/CacheFilters.java
@@ -1,4 +1,4 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -19,14 +19,12 @@
 package org.apache.felix.eventadmin.impl.handler;
 
 import org.apache.felix.eventadmin.impl.util.CacheMap;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.Filter;
-import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.*;
 
 /**
  * This is an implementation of the <tt>Filters</tt> factory that uses a cache in
  * order to speed-up filter creation.
- * 
+ *
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
 public class CacheFilters implements Filters
@@ -38,9 +36,9 @@
     private final BundleContext m_context;
 
     /**
-     * The constructor of this factory. The cache is used to speed-up filter 
+     * The constructor of this factory. The cache is used to speed-up filter
      * creation.
-     * 
+     *
      * @param cache The cache to use
      * @param context The context of the bundle used to create the <tt>Filter</tt>
      *      objects
@@ -51,43 +49,42 @@
         {
             throw new NullPointerException("Cache may not be null");
         }
-        
+
         if(null == context)
         {
             throw new NullPointerException("Context may not be null");
         }
-        
+
         m_cache = cache;
 
         m_context = context;
     }
 
     /**
-     * Create a filter for the given filter string or return the nullFilter in case
+     * Create a filter for the given filter string or return the TRUE_FILTER in case
      * the string is <tt>null</tt>.
-     * 
+     *
      * @param filter The filter as a string
-     * @param nullFilter The default value to return if filter is <tt>null</tt>
-     * @return The <tt>Filter</tt> of the filter string or the nullFilter if the 
+     * @return The <tt>Filter</tt> of the filter string or the TRUE_FILTER if the
      *      filter string was <tt>null</tt>
      * @throws InvalidSyntaxException if <tt>BundleContext.createFilter()</tt>
      *      throws an <tt>InvalidSyntaxException</tt>
-     *      
-     * @see org.apache.felix.eventadmin.impl.handler.Filters#createFilter(java.lang.String, org.osgi.framework.Filter)
+     *
+     * @see org.apache.felix.eventadmin.impl.handler.Filters#createFilter(java.lang.String)
      */
-    public Filter createFilter(String filter, Filter nullFilter)
+    public Filter createFilter(String filter)
         throws InvalidSyntaxException
     {
         Filter result = (Filter) ((null != filter) ? m_cache.get(filter)
-            : nullFilter);
-        
+            : TRUE_FILTER);
+
         if (null == result)
         {
             result = m_context.createFilter(filter);
 
             m_cache.add(filter, result);
         }
-        
+
         return result;
     }
 
diff --git a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/handler/Filters.java b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/handler/Filters.java
index f7f56cc..40ee69d 100644
--- a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/handler/Filters.java
+++ b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/handler/Filters.java
@@ -72,56 +72,15 @@
     };
 
     /**
-     * A null filter object that does not match any given service reference.
-     */
-    Filter FALSE_FILTER = new Filter()
-    {
-
-        /**
-         * This is a null object that always returns <tt>false</tt>.
-         *
-         * @param reference An unused reference.
-         * @return <tt>false</tt>
-         */
-        public boolean match(final ServiceReference reference)
-        {
-           return false;
-        }
-
-        /**
-         * This is a null object that always returns <tt>false</tt>.
-         *
-         * @param dictionary An unused dictionary
-         * @return <tt>false</tt>
-         */
-        public boolean match(final Dictionary dictionary)
-        {
-            return false;
-        }
-
-        /**
-         * This is a null object that always returns <tt>false</tt>.
-         *
-         * @param dictionary An unused dictionary.
-         * @return <tt>false</tt>
-         */
-        public boolean matchCase(final Dictionary dictionary)
-        {
-            return false;
-        }
-    };
-
-    /**
-     * Create a filter for the given filter string or return the nullFilter in case
+     * Create a filter for the given filter string or return the TRUE_FILTER in case
      * the string is <tt>null</tt>.
      *
      * @param filter The filter as a string
-     * @param nullFilter The default value to return if filter is <tt>null</tt>
-     * @return The <tt>Filter</tt> of the filter string or the nullFilter if the
+     * @return The <tt>Filter</tt> of the filter string or the TRUE_FILTER if the
      *      filter string was null
      * @throws InvalidSyntaxException if <tt>BundleContext.createFilter()</tt>
      *      throws an <tt>InvalidSyntaxException</tt>
      */
-    Filter createFilter(final String filter, final Filter nullFilter)
+    Filter createFilter(final String filter)
         throws InvalidSyntaxException;
 }
diff --git a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/security/CacheTopicPermissions.java b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/security/CacheTopicPermissions.java
deleted file mode 100644
index 0ba57d3..0000000
--- a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/security/CacheTopicPermissions.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/* 
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.eventadmin.impl.security;
-
-import org.apache.felix.eventadmin.impl.util.CacheMap;
-
-/**
- * An implementation of the <tt>TopicPermissions</tt> factory that uses a given
- * cache in order to speed-up topic permission creation. Note that a 
- * <tt>java.lang.Object</tt> is returned in case creating a new TopicPermission 
- * fails. This assumes that Bundle.hasPermission is used in order to evaluate the
- * created Permission which in turn will return true if security is not supported
- * by the framework. Otherwise, it will return false due to receiving something that
- * is not a subclass of <tt>java.lang.SecurityPermission</tt> hence, this combination
- * ensures that access is granted in case a topic permission could not be created due
- * to missing security support by the framework. 
- *  
- * @see org.apache.felix.eventadmin.impl.security.TopicPermissions
- * 
- * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
- */
-public class CacheTopicPermissions implements TopicPermissions
-{
-    // The cache used
-    private final CacheMap m_cache;
-    
-    // The type of the permissions created
-    private final String m_type;
-    
-    /**
-     * The constructor of this permission factory. The given cache will be used to
-     * speed-up permission creation and the created permissions will be of the given
-     * type (i.e., PUBLISH or SUBSCRIBE).
-     * 
-     * @param cache The cache to be used
-     * @param type The type that created permissions will be of (i.e, PUBLISH or
-     *      SUBSCRIBE)
-     *      
-     * @see org.apache.felix.eventadmin.impl.security.TopicPermissions
-     * @see org.osgi.service.event.TopicPermission#PUBLISH
-     * @see org.osgi.service.event.TopicPermission#SUBSCRIBE
-     */
-    public CacheTopicPermissions(final CacheMap cache, final String type)
-    {
-        checkNull(cache, "CacheMap");
-        checkNull(type, "Type");
-       
-        if(!org.osgi.service.event.TopicPermission.PUBLISH.equals(type) && 
-            !org.osgi.service.event.TopicPermission.SUBSCRIBE.equals(type))
-        {
-            throw new IllegalArgumentException(
-                "Type must be either PUBLISH or SUBSCRIBE");
-        }
-        
-        m_cache = cache;
-        
-        m_type = type;
-    }
-
-    /**
-     * Returns the type of the permissions created by this factory.
-     * 
-     * @return The type of the permissions created by this factory
-     * 
-     * @see org.apache.felix.eventadmin.impl.security.TopicPermissions#getType()
-     * @see org.osgi.service.event.TopicPermission#PUBLISH
-     * @see org.osgi.service.event.TopicPermission#SUBSCRIBE
-     */
-    public String getType()
-    {
-        return m_type;
-    }
-
-    /**
-     * Creates a <tt>TopicPermission</tt> for the given topic and the type of this
-     * factory (i.e., PUBLISH or SUBSCRIBE). Note that a 
-     * <tt>java.lang.Object</tt> is returned in case creating a new TopicPermission 
-     * fails. This assumes that Bundle.hasPermission is used in order to evaluate the
-     * created Permission which in turn will return true if security is not supported
-     * by the framework. Otherwise, it will return false due to receiving something 
-     * that is not a subclass of <tt>java.lang.SecurityPermission</tt> hence, this 
-     * combination ensures that access is granted in case a topic permission could 
-     * not be created due to missing security support by the framework.
-     * 
-     * @param topic The target topic
-     * 
-     * @return The created permission or a <tt>java.lang.Object</tt> in case the
-     *      permission could not be created.
-     *      
-     * @see org.apache.felix.eventadmin.impl.security.TopicPermissions#createTopicPermission(String)
-     * @see org.osgi.service.event.TopicPermission
-     */
-    public Object createTopicPermission(final String topic)
-    {
-        Object result = m_cache.get(topic);
-        
-        if(null == result)
-        {
-            try
-            {
-                result = new org.osgi.service.event.TopicPermission(topic, m_type);
-            } catch (Throwable t)
-            {
-                // This might happen in case security is not supported
-                // Bundle.hasPermission will return true in this case
-                // hence topicPermission = new Object() is o.k.
-                
-                result = new Object();
-            }
-            
-            m_cache.add(topic, result);
-        }
-        
-        return result;
-    }
-    
-    /*
-     * This is a utility method that will throw a <tt>NullPointerException</tt>
-     * in case that the given object is null. The message will be of the form name +
-     * may not be null.
-     */
-    private void checkNull(final Object object, final String name)
-    {
-        if(null == object)
-        {
-            throw new NullPointerException(name + " may not be null");
-        }
-    }
-}
diff --git a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/security/EventAdminSecurityDecorator.java b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/security/EventAdminSecurityDecorator.java
index db677e9..537047e 100644
--- a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/security/EventAdminSecurityDecorator.java
+++ b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/security/EventAdminSecurityDecorator.java
@@ -1,4 +1,4 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -23,91 +23,83 @@
 import org.osgi.service.event.EventAdmin;
 
 /**
- * This class is a decorator for an <tt>EventAdmin</tt> service. It secures the 
+ * This class is a decorator for an <tt>EventAdmin</tt> service. It secures the
  * service by checking any call from a given bundle (i.e., the caller) to the admins
  * post or send methods for the appropriate permissions based on a given permission
  * factory. This methods then in turn throw a <tt>SecurityException</tt> in case
  * the given bundle doesn't pass the check or delegate the call to decorated service
  * instance, respectively.
- *  
+ *
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
 public class EventAdminSecurityDecorator implements EventAdmin
 {
     // The bundle used to determine appropriate permissions
     private final Bundle m_bundle;
-    
+
     // The decorated service instance
     private final EventAdmin m_admin;
-    
-    // The permission factory
-    private final TopicPermissions m_topicPermissions;
-    
+
     /**
-     * The constructor of this decorator. The given bundle and permission factory 
-     * will be used to determine appropriate permissions for any call to 
+     * The constructor of this decorator. The given bundle and permission factory
+     * will be used to determine appropriate permissions for any call to
      * <tt>postEvent()</tt> or <tt>sendEvent()</tt>, respectively. This method then
-     * in turn throw a <tt>SecurityException</tt> in case the given bundle doesn't 
-     * pass the check. 
-     * 
+     * in turn throw a <tt>SecurityException</tt> in case the given bundle doesn't
+     * pass the check.
+     *
      * @param bundle The calling bundle used to determine appropriate permissions
      * @param admin The decorated service instance
-     * @param topicPermissions The permission factory 
      */
-    public EventAdminSecurityDecorator(final Bundle bundle, final EventAdmin admin, 
-        final TopicPermissions topicPermissions)
+    public EventAdminSecurityDecorator(final Bundle bundle, final EventAdmin admin)
     {
-        checkNull(bundle, "Bundle"); 
+        checkNull(bundle, "Bundle");
         checkNull(admin, "Admin");
-        checkNull(topicPermissions, "TopicPermissions");
-        
+
         m_bundle = bundle;
-        
+
         m_admin = admin;
-        
-        m_topicPermissions = topicPermissions;
     }
-    
+
     /**
-     * This method checks whether the given (i.e., calling) bundle has 
-     * appropriate permissions to post an event to the targeted topic. A 
-     * <tt>SecurityException</tt> is thrown in case it has not. Otherwise, the 
+     * This method checks whether the given (i.e., calling) bundle has
+     * appropriate permissions to post an event to the targeted topic. A
+     * <tt>SecurityException</tt> is thrown in case it has not. Otherwise, the
      * event is posted using this decorator's service instance.
-     * 
+     *
      * @param event The event that should be posted
-     * 
+     *
      * @see org.osgi.service.event.EventAdmin#postEvent(org.osgi.service.event.Event)
      */
     public void postEvent(final Event event)
     {
         checkPermission(event.getTopic());
-        
+
         m_admin.postEvent(event);
     }
 
     /**
-     * This method checks whether the given (i.e., calling) bundle has 
+     * This method checks whether the given (i.e., calling) bundle has
      * appropriate permissions to send an event to the targeted topic. A
      * <tt>SecurityException</tt> is thrown in case it has not. Otherwise,
      * the event is posted using this decorator's service instance.
-     * 
+     *
      * @param event The event that should be send
-     * 
+     *
      * @see org.osgi.service.event.EventAdmin#sendEvent(org.osgi.service.event.Event)
      */
     public void sendEvent(final Event event)
     {
         checkPermission(event.getTopic());
-        
+
         m_admin.sendEvent(event);
     }
 
     /**
-     * Overrides <tt>hashCode()</tt> and returns the hash code of the decorated 
+     * Overrides <tt>hashCode()</tt> and returns the hash code of the decorated
      * service instance.
-     * 
+     *
      * @return The hash code of the decorated service instance
-     * 
+     *
      * @see java.lang.Object#hashCode()
      * @see org.osgi.service.event.EventAdmin
      */
@@ -115,14 +107,14 @@
     {
         return m_admin.hashCode();
     }
-    
+
     /**
-     * Overrides <tt>equals()</tt> and delegates the call to the decorated service 
+     * Overrides <tt>equals()</tt> and delegates the call to the decorated service
      * instance. In case that o is an instance of this class it passes o's service
      * instance instead of o.
-     * 
+     *
      * @param o The object to compare with this decorator's service instance
-     * 
+     *
      * @see java.lang.Object#equals(java.lang.Object)
      * @see org.osgi.service.event.EventAdmin
      */
@@ -132,25 +124,25 @@
         {
             return m_admin.equals(((EventAdminSecurityDecorator) o).m_admin);
         }
-        
+
         return m_admin.equals(o);
     }
-    
+
     /*
      * This is a utility method that will throw a <tt>SecurityExcepiton</tt> in case
-     * that the given bundle (i.e, the caller) has not appropriate permissions to 
+     * that the given bundle (i.e, the caller) has not appropriate permissions to
      * publish to this topic. This method uses Bundle.hasPermission() and the given
-     * permission factory to determine this. 
+     * permission factory to determine this.
      */
     private void checkPermission(final String topic)
     {
-        if(!m_bundle.hasPermission(m_topicPermissions.createTopicPermission(topic)))
+        if(!m_bundle.hasPermission(PermissionsUtil.createPublishPermission(topic)))
         {
-            throw new SecurityException("Bundle[" + m_bundle + 
+            throw new SecurityException("Bundle[" + m_bundle +
                 "] has no PUBLISH permission for topic [" + topic + "]");
         }
     }
-    
+
     /*
      * This is a utility method that will throw a <tt>NullPointerException</tt>
      * in case that the given object is null. The message will be of the form name +
diff --git a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/security/PermissionsUtil.java b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/security/PermissionsUtil.java
new file mode 100644
index 0000000..01717a0
--- /dev/null
+++ b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/security/PermissionsUtil.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.eventadmin.impl.security;
+
+import org.osgi.service.event.TopicPermission;
+
+/**
+ * Utility class for permissions.
+ *
+ * @see org.apache.felix.eventadmin.impl.security.TopicPermissions
+ *
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+public abstract class PermissionsUtil
+{
+    /**
+     * Creates a <tt>TopicPermission</tt> for the given topic and the type PUBLISH
+     * Note that a
+     * <tt>java.lang.Object</tt> is returned in case creating a new TopicPermission
+     * fails. This assumes that Bundle.hasPermission is used in order to evaluate the
+     * created Permission which in turn will return true if security is not supported
+     * by the framework. Otherwise, it will return false due to receiving something
+     * that is not a subclass of <tt>java.lang.SecurityPermission</tt> hence, this
+     * combination ensures that access is granted in case a topic permission could
+     * not be created due to missing security support by the framework.
+     *
+     * @param topic The target topic
+     *
+     * @return The created permission or a <tt>java.lang.Object</tt> in case the
+     *      permission could not be created.
+     *
+     * @see org.apache.felix.eventadmin.impl.security.TopicPermissions#createTopicPermission(String)
+     * @see org.osgi.service.event.TopicPermission
+     */
+    public static Object createPublishPermission(final String topic)
+    {
+        Object result;
+        try
+        {
+            result = new org.osgi.service.event.TopicPermission(topic, TopicPermission.PUBLISH);
+        } catch (Throwable t)
+        {
+            // This might happen in case security is not supported
+            // Bundle.hasPermission will return true in this case
+            // hence topicPermission = new Object() is o.k.
+
+            result = new Object();
+        }
+        return result;
+    }
+
+    /**
+     * Creates a <tt>TopicPermission</tt> for the given topic and the type SUBSCRIBE
+     * Note that a
+     * <tt>java.lang.Object</tt> is returned in case creating a new TopicPermission
+     * fails. This assumes that Bundle.hasPermission is used in order to evaluate the
+     * created Permission which in turn will return true if security is not supported
+     * by the framework. Otherwise, it will return false due to receiving something
+     * that is not a subclass of <tt>java.lang.SecurityPermission</tt> hence, this
+     * combination ensures that access is granted in case a topic permission could
+     * not be created due to missing security support by the framework.
+     *
+     * @param topic The target topic
+     *
+     * @return The created permission or a <tt>java.lang.Object</tt> in case the
+     *      permission could not be created.
+     *
+     * @see org.apache.felix.eventadmin.impl.security.TopicPermissions#createTopicPermission(String)
+     * @see org.osgi.service.event.TopicPermission
+     */
+    public static Object createSubscribePermission(final String topic)
+    {
+        Object result;
+        try
+        {
+            result = new org.osgi.service.event.TopicPermission(topic, TopicPermission.SUBSCRIBE);
+        } catch (Throwable t)
+        {
+            // This might happen in case security is not supported
+            // Bundle.hasPermission will return true in this case
+            // hence topicPermission = new Object() is o.k.
+
+            result = new Object();
+        }
+        return result;
+    }
+
+}
diff --git a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/security/SecureEventAdminFactory.java b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/security/SecureEventAdminFactory.java
index c779d21..f374894 100644
--- a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/security/SecureEventAdminFactory.java
+++ b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/security/SecureEventAdminFactory.java
@@ -35,26 +35,18 @@
     // The EventAdmin to secure
     private final EventAdmin m_admin;
 
-    // The permission factory
-    private TopicPermissions m_topicPermissions;
-
     /**
      * The constructor of the factory. The factory will use the given event admin and
      * permission factory to create a new <tt>EventAdminSecurityDecorator</tt>
      * on any call to <tt>getService()</tt>.
      *
      * @param admin The <tt>EventAdmin</tt> service to secure.
-     * @param topicPermissions The permission factory to use for permission lookup.
      */
-    public SecureEventAdminFactory(final EventAdmin admin, final TopicPermissions
-        topicPermissions)
+    public SecureEventAdminFactory(final EventAdmin admin)
     {
         checkNull(admin, "Admin");
-        checkNull(topicPermissions, "TopicPermissions");
 
         m_admin = admin;
-
-        m_topicPermissions = topicPermissions;
     }
 
     /**
@@ -74,7 +66,7 @@
         final ServiceRegistration registration)
     {
         // We don't need to cache this objects since the framework already does this.
-        return new EventAdminSecurityDecorator(bundle, m_admin, m_topicPermissions);
+        return new EventAdminSecurityDecorator(bundle, m_admin);
     }
 
     /**
@@ -106,9 +98,4 @@
             throw new NullPointerException(name + " may not be null");
         }
     }
-
-    public void update(final TopicPermissions topicPermissions) {
-        checkNull(topicPermissions, "TopicPermissions");
-        m_topicPermissions = topicPermissions;
-    }
 }
diff --git a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/security/TopicPermissions.java b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/security/TopicPermissions.java
deleted file mode 100644
index 2f07d48..0000000
--- a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/security/TopicPermissions.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/* 
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.eventadmin.impl.security;
-
-/**
- * A <tt>TopicPermission</tt> factory. The factory is bound to a specific type (i.e.,
- * either PUBLISH or SUBSCRIBE) and subsequently allows to create new permission
- * objects by providing the topic. Note that the created permission objects most 
- * likely will be cached and that in case that a permission can not be created due
- * to missing security support by the framework (i.e, security is not supported at 
- * all) an instance of <tt>java.lang.Object</tt> will be returned. 
- * 
- * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
- */
-public interface TopicPermissions
-{
-    /**
-     * Get the type (i.e., PUBLISH or SUBSCRIBE) of the permission objects that this
-     * factory will create.
-     * 
-     * @return The type of the permission objects that this factory will create.
-     * 
-     * @see org.osgi.service.event.TopicPermission#PUBLISH
-     * @see org.osgi.service.event.TopicPermission#SUBSCRIBE
-     */
-    public String getType();
-    
-    /**
-     * This method returns a <tt>TopicPermission</tt> object for the given topic and
-     * the type (i.e., PUBLISH or SUBSCRIBE) of this factory. Note that this methods
-     * returns an instance of <tt>java.lang.Object</tt> in case that a permission 
-     * could not be created due to missing security support by the framework.
-     *  
-     * @param topic The targeted topic.
-     * 
-     * @return A <tt>TopicPermission</tt> for the given topic and the type of this
-     *      factory or a <tt>java.lang.Object</tt> in case that the permission could 
-     *      not be created due to missing security support by the framework.
-     *
-     * @see org.osgi.service.event.TopicPermission
-     * @see org.osgi.service.event.TopicPermission#PUBLISH
-     * @see org.osgi.service.event.TopicPermission#SUBSCRIBE
-     */
-    public Object createTopicPermission(final String topic);
-}
diff --git a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/AsyncDeliverTasks.java b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/AsyncDeliverTasks.java
index 2d09352..c2ce1d2 100644
--- a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/AsyncDeliverTasks.java
+++ b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/AsyncDeliverTasks.java
@@ -20,7 +20,7 @@
 
 import java.util.*;
 
-import org.apache.felix.eventadmin.impl.dispatch.ThreadPool;
+import org.apache.felix.eventadmin.impl.dispatch.DefaultThreadPool;
 
 /**
  * This class does the actual work of the asynchronous event dispatch.
@@ -30,7 +30,7 @@
 public class AsyncDeliverTasks implements DeliverTask
 {
     /** The thread pool to use to spin-off new threads. */
-    private final ThreadPool m_pool;
+    private final DefaultThreadPool m_pool;
 
     /** The deliver task for actually delivering the events. This
      * is the sync deliver tasks as this has all the code for timeout
@@ -49,7 +49,7 @@
      *      dispatching thread is used to send a synchronous event
      * @param deliverTask The deliver tasks for dispatching the event.
      */
-    public AsyncDeliverTasks(final ThreadPool pool, final DeliverTask deliverTask)
+    public AsyncDeliverTasks(final DefaultThreadPool pool, final DeliverTask deliverTask)
     {
         m_pool = pool;
         m_deliver_task = deliverTask;
diff --git a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/SyncDeliverTasks.java b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/SyncDeliverTasks.java
index 95e4328..a2ae104 100644
--- a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/SyncDeliverTasks.java
+++ b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/SyncDeliverTasks.java
@@ -18,7 +18,7 @@
  */
 package org.apache.felix.eventadmin.impl.tasks;
 
-import org.apache.felix.eventadmin.impl.dispatch.ThreadPool;
+import org.apache.felix.eventadmin.impl.dispatch.DefaultThreadPool;
 
 import EDU.oswego.cs.dl.util.concurrent.TimeoutException;
 
@@ -52,7 +52,7 @@
 public class SyncDeliverTasks implements DeliverTask
 {
     /** The thread pool used to spin-off new threads. */
-    final ThreadPool m_pool;
+    final DefaultThreadPool m_pool;
 
     /** The timeout for event handlers, 0 = disabled. */
     long m_timeout;
@@ -111,7 +111,7 @@
      * @param pool The thread pool used to spin-off new threads.
      * @param timeout The timeout for an event handler, 0 = disabled
      */
-    public SyncDeliverTasks(final ThreadPool pool, final long timeout, final String[] ignoreTimeout)
+    public SyncDeliverTasks(final DefaultThreadPool pool, final long timeout, final String[] ignoreTimeout)
     {
         m_pool = pool;
         update(timeout, ignoreTimeout);
