Examples of MBeanEntry


Examples of org.jboss.mx.server.registry.MBeanEntry

   }

   public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback)
   throws InstanceNotFoundException
   {
      MBeanEntry entry                    = registry.get(name);
      ClassLoader newTCL                  = entry.getClassLoader();
      NotificationBroadcaster broadcaster = entry.getInvoker();

      Thread thread = Thread.currentThread();
      ClassLoader oldTCL = thread.getContextClassLoader();
      try
      {
         if (newTCL != oldTCL && newTCL != null)
            thread.setContextClassLoader(newTCL);

         listeners.add(entry.getObjectName(), broadcaster, listener, filter, handback);
      }
      finally
      {
         if (newTCL != oldTCL && newTCL != null)
            thread.setContextClassLoader(oldTCL);
View Full Code Here

Examples of org.jboss.mx.server.registry.MBeanEntry

   }

   public void addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback)
   throws InstanceNotFoundException
   {
      MBeanEntry entry                    = registry.get(name);
      ClassLoader newTCL                  = entry.getClassLoader();
      NotificationBroadcaster broadcaster = entry.getInvoker();

      Thread thread = Thread.currentThread();
      ClassLoader oldTCL = thread.getContextClassLoader();
      try
      {
         if (newTCL != oldTCL && newTCL != null)
            thread.setContextClassLoader(newTCL);

         listeners.add(entry.getObjectName(), broadcaster,
            (NotificationListener) registry.get(listener).getResourceInstance(), filter, handback);
      }
      finally
      {
         if (newTCL != oldTCL && newTCL != null)
View Full Code Here

Examples of org.jboss.mx.server.registry.MBeanEntry

   }

   public void removeNotificationListener(ObjectName name, NotificationListener listener)
   throws InstanceNotFoundException, ListenerNotFoundException
   {
      MBeanEntry entry                    = registry.get(name);
      ClassLoader newTCL                  = entry.getClassLoader();

      Thread thread = Thread.currentThread();
      ClassLoader oldTCL = thread.getContextClassLoader();
      try
      {
         if (newTCL != oldTCL && newTCL != null)
            thread.setContextClassLoader(newTCL);

         listeners.remove(entry.getObjectName(), listener);
      }
      finally
      {
         if (newTCL != oldTCL && newTCL != null)
            thread.setContextClassLoader(oldTCL);
View Full Code Here

Examples of org.jboss.mx.server.registry.MBeanEntry

   }

   public void removeNotificationListener(ObjectName name, ObjectName listener)
   throws InstanceNotFoundException, ListenerNotFoundException
   {
      MBeanEntry entry                    = registry.get(name);
      ClassLoader newTCL                  = entry.getClassLoader();

      Thread thread = Thread.currentThread();
      ClassLoader oldTCL = thread.getContextClassLoader();
      try
      {
         if (newTCL != oldTCL && newTCL != null)
            thread.setContextClassLoader(newTCL);

         listeners.remove(entry.getObjectName(), (NotificationListener) registry.get(listener).getResourceInstance());
      }
      finally
      {
         if (newTCL != oldTCL && newTCL != null)
            thread.setContextClassLoader(oldTCL);
View Full Code Here

Examples of org.jboss.mx.server.registry.MBeanEntry

   public void removeNotificationListener(ObjectName name, NotificationListener listener,
                                          NotificationFilter filter, Object handback)
      throws InstanceNotFoundException, ListenerNotFoundException
   {
      MBeanEntry entry                    = registry.get(name);
      ClassLoader newTCL                  = entry.getClassLoader();

      Thread thread = Thread.currentThread();
      ClassLoader oldTCL = thread.getContextClassLoader();
      try
      {
         if (newTCL != oldTCL && newTCL != null)
            thread.setContextClassLoader(newTCL);

         listeners.remove(entry.getObjectName(), listener, filter, handback);
      }
      finally
      {
         if (newTCL != oldTCL && newTCL != null)
            thread.setContextClassLoader(oldTCL);
View Full Code Here

Examples of org.jboss.mx.server.registry.MBeanEntry

     */
   public void removeNotificationListener(ObjectName name, ObjectName listener,
                                          NotificationFilter filter, Object handback)
      throws InstanceNotFoundException, ListenerNotFoundException
   {
      MBeanEntry entry                    = registry.get(name);
      ClassLoader newTCL                  = entry.getClassLoader();

      Thread thread = Thread.currentThread();
      ClassLoader oldTCL = thread.getContextClassLoader();
      try
      {
         if (newTCL != oldTCL && newTCL != null)
            thread.setContextClassLoader(newTCL);

         listeners.remove(entry.getObjectName(), (NotificationListener) registry.get(listener).getResourceInstance(),
                          filter, handback);
      }
      finally
      {
         if (newTCL != oldTCL && newTCL != null)
View Full Code Here

Examples of org.jboss.mx.server.registry.MBeanEntry

   }

    public ClassLoader getClassLoaderFor(ObjectName name)
       throws InstanceNotFoundException
    {
       MBeanEntry entry = registry.get(name);
       ClassLoader cl = entry.getClassLoader();
       if (cl == null)
          cl = entry.getResourceInstance().getClass().getClassLoader();
       return cl;
    }
View Full Code Here

Examples of org.jboss.mx.server.registry.MBeanEntry

    }

    public ClassLoader getClassLoader(ObjectName name)
       throws InstanceNotFoundException
    {
       MBeanEntry entry = registry.get(name);
       Object cl = entry.getResourceInstance();
       if ((cl instanceof ClassLoader) == false)
          throw new InstanceNotFoundException("Not a classloader " + name);
       return (ClassLoader) cl;
    }
View Full Code Here

Examples of org.jboss.mx.server.registry.MBeanEntry

   public void unregisterMBean(ObjectName name)
           throws InstanceNotFoundException, MBeanRegistrationException
   {
      // Get the mbean to remove
      MBeanEntry entry = registry.get(name);
      Object mbean = entry.getResourceInstance();
      name = entry.getObjectName();

      checkMBeanPermission(entry.getResourceClassName(), null, name, "unregisterMBean");

      try
      {
         final Object[] args = {name};
         final String[] sig = {ObjectName.class.getName()};
View Full Code Here

Examples of org.jboss.mx.server.registry.MBeanEntry

      List entries = registry.findEntries(name);
      Iterator iterator = entries.iterator();
      while (iterator.hasNext())
      {
         // Check each MBean against the query
         MBeanEntry entry = (MBeanEntry) iterator.next();
         ObjectName objectName = entry.getObjectName();
         // The permission check must be done before the query is applied
         if( sm != null )
         {
            try
            {
               checkMBeanPermission(entry.getResourceClassName(), null,
                  objectName, "queryMBeans");
            }
            catch(SecurityException e)
            {
               if( log.isTraceEnabled() )
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.