avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pro...@apache.org
Subject cvs commit: jakarta-avalon-apps/phyre/src/java/org/apache/avalon/phyre/mbean MBeanManager.java
Date Wed, 31 Jul 2002 20:39:55 GMT
proyal      2002/07/31 13:39:55

  Modified:    phyre/src/java/org/apache/avalon/phyre/mbean
                        MBeanManager.java
  Log:
  Added method to check if object is registered
  
  Revision  Changes    Path
  1.2       +14 -1     jakarta-avalon-apps/phyre/src/java/org/apache/avalon/phyre/mbean/MBeanManager.java
  
  Index: MBeanManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/phyre/src/java/org/apache/avalon/phyre/mbean/MBeanManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MBeanManager.java	26 Jul 2002 20:16:36 -0000	1.1
  +++ MBeanManager.java	31 Jul 2002 20:39:55 -0000	1.2
  @@ -8,6 +8,7 @@
   package org.apache.avalon.phyre.mbean;
   
   import java.util.Hashtable;
  +import javax.management.MalformedObjectNameException;
   import javax.management.ObjectName;
   
   import mx4j.connector.RemoteMBeanServer;
  @@ -45,6 +46,18 @@
           return h;
       }
   
  +    public boolean isRegistered( final String name )
  +    {
  +        try
  +        {
  +            return m_server.isRegistered( getObjectName( name ) );
  +        }
  +        catch( MalformedObjectNameException e )
  +        {
  +            return false;
  +        }
  +    }
  +
       public MBeanAccessor getObject( final String name )
           throws Exception
       {
  @@ -52,7 +65,7 @@
       }
   
       private ObjectName getObjectName( final String name )
  -        throws Exception
  +        throws MalformedObjectNameException
       {
           //Deal with domains et al here
           return new ObjectName( name );
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message