User: schaefera
  Date: 02/03/15 22:44:57

  Modified:    src/main/org/jboss/management/j2ee AppClientModule.java
                        EJB.java EJBModule.java J2EEApplication.java
                        J2EEManagedObject.java J2EEResource.java
                        JCAConnectionFactory.java JDBCDataSource.java
                        JVM.java ResourceAdapter.java
                        ResourceAdapterModule.java Servlet.java
                        WebModule.java
  Log:
  Adjusted the definition of the <parent-j2eeType> according to the current
  specification. Now a single method (getParentKeys()) delivers these
  ObjectName properties with key of the J2EE_TYPE of the parent(s) (for more
  information please see JSR77.3.1.1.1.3).
  
  Revision  Changes    Path
  1.2       +16 -1     
jboss-management/src/main/org/jboss/management/j2ee/AppClientModule.java
  
  Index: AppClientModule.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss-management/src/main/org/jboss/management/j2ee/AppClientModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AppClientModule.java      11 Mar 2002 04:31:32 -0000      1.1
  +++ AppClientModule.java      16 Mar 2002 06:44:56 -0000      1.2
  @@ -8,6 +8,7 @@
   
   import java.util.Arrays;
   import java.util.ArrayList;
  +import java.util.Hashtable;
   import java.util.List;
   
   import javax.management.MalformedObjectNameException;
  @@ -20,7 +21,7 @@
    * {@link javax.management.j2ee.AppClientModule AppClientModule}.
    *
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Andreas Schaefer</a>.
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    *   
    * <p><b>Revisions:</b>
    *
  @@ -74,6 +75,20 @@
      // Package protected ---------------------------------------------
      
      // Protected -----------------------------------------------------
  +   
  +   /**
  +    * @return A hashtable with the J2EE-Application and J2EE-Server as parent
  +    **/
  +   protected Hashtable getParentKeys( ObjectName pParent ) {
  +      Hashtable lReturn = new Hashtable();
  +      Hashtable lProperties = pParent.getKeyPropertyList();
  +      lReturn.put( J2EEApplication.J2EE_TYPE, lProperties.get( "name" ) );
  +      // J2EE-Server is already parent of J2EE-Application therefore lookup
  +      // the name by the J2EE-Server type
  +      lReturn.put( J2EEServer.J2EE_TYPE, lProperties.get( J2EEServer.J2EE_TYPE ) );
  +      
  +      return lReturn;
  +   }
      
      // Private -------------------------------------------------------
      
  
  
  
  1.2       +26 -1     jboss-management/src/main/org/jboss/management/j2ee/EJB.java
  
  Index: EJB.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss-management/src/main/org/jboss/management/j2ee/EJB.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EJB.java  11 Mar 2002 04:31:32 -0000      1.1
  +++ EJB.java  16 Mar 2002 06:44:56 -0000      1.2
  @@ -6,6 +6,8 @@
    */
   package org.jboss.management.j2ee;
   
  +import java.util.Hashtable;
  +
   import javax.management.MalformedObjectNameException;
   import javax.management.MBeanServer;
   import javax.management.ObjectName;
  @@ -17,7 +19,7 @@
    * {@link javax.management.j2ee.EJB EJB}.
    *
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Andreas Schaefer</a>.
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    *   
    * <p><b>Revisions:</b>
    *
  @@ -104,4 +106,27 @@
      public String toString() {
         return "EJB { " + super.toString() + " } []";
      }
  +   // Package protected ---------------------------------------------
  +   
  +   // Protected -----------------------------------------------------
  +   
  +   /**
  +    * @return A hashtable with the EJB-Module, J2EE-Application and J2EE-Server as 
parent
  +    **/
  +   protected Hashtable getParentKeys( ObjectName pParent ) {
  +      Hashtable lReturn = new Hashtable();
  +      Hashtable lProperties = pParent.getKeyPropertyList();
  +      lReturn.put( EJBModule.J2EE_TYPE, lProperties.get( "name" ) );
  +      // J2EE-Application and J2EE-Server is already parent of J2EE-Application 
therefore lookup
  +      // the name by the J2EE-Server type
  +      lReturn.put( J2EEApplication.J2EE_TYPE, lProperties.get( 
J2EEApplication.J2EE_TYPE ) );
  +      lReturn.put( J2EEServer.J2EE_TYPE, lProperties.get( J2EEServer.J2EE_TYPE ) );
  +      System.out.println( "------------------>>>>>>>>>>>> EJB.getParentKeys(), 
return: " + lReturn );
  +      return lReturn;
  +   }
  +   
  +   // Private -------------------------------------------------------
  +   
  +   // Inner classes -------------------------------------------------
  +   
   }
  
  
  
  1.4       +16 -1     
jboss-management/src/main/org/jboss/management/j2ee/EJBModule.java
  
  Index: EJBModule.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss-management/src/main/org/jboss/management/j2ee/EJBModule.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- EJBModule.java    13 Mar 2002 04:42:05 -0000      1.3
  +++ EJBModule.java    16 Mar 2002 06:44:56 -0000      1.4
  @@ -11,6 +11,7 @@
   import java.util.ArrayList;
   import java.util.Arrays;
   import java.util.HashMap;
  +import java.util.Hashtable;
   import java.util.Iterator;
   import java.util.List;
   import java.util.Map;
  @@ -30,7 +31,7 @@
    * {@link javax.management.j2ee.EJBModule EJBModule}.
    *
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Andreas Schaefer</a>.
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    *   
    * <p><b>Revisions:</b>
    *
  @@ -401,6 +402,20 @@
      // Package protected ---------------------------------------------
      
      // Protected -----------------------------------------------------
  +   
  +   /**
  +    * @return A hashtable with the J2EE-Application and J2EE-Server as parent
  +    **/
  +   protected Hashtable getParentKeys( ObjectName pParent ) {
  +      Hashtable lReturn = new Hashtable();
  +      Hashtable lProperties = pParent.getKeyPropertyList();
  +      lReturn.put( J2EEApplication.J2EE_TYPE, lProperties.get( "name" ) );
  +      // J2EE-Server is already parent of J2EE-Application therefore lookup
  +      // the name by the J2EE-Server type
  +      lReturn.put( J2EEServer.J2EE_TYPE, lProperties.get( J2EEServer.J2EE_TYPE ) );
  +      
  +      return lReturn;
  +   }
      
      // Private -------------------------------------------------------
      
  
  
  
  1.3       +12 -1     
jboss-management/src/main/org/jboss/management/j2ee/J2EEApplication.java
  
  Index: J2EEApplication.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss-management/src/main/org/jboss/management/j2ee/J2EEApplication.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- J2EEApplication.java      13 Mar 2002 04:42:05 -0000      1.2
  +++ J2EEApplication.java      16 Mar 2002 06:44:56 -0000      1.3
  @@ -24,7 +24,7 @@
    * {@link javax.management.j2ee.J2EEApplication J2EEApplication}.
    *
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Andreas Schaefer</a>.
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    *   
    * <p><b>Revisions:</b>
    *
  @@ -200,6 +200,17 @@
      // Package protected ---------------------------------------------
      
      // Protected -----------------------------------------------------
  +   
  +   /**
  +    * @return A hashtable with the J2EE Server as parent
  +    **/
  +   protected Hashtable getParentKeys( ObjectName pParent ) {
  +      Hashtable lReturn = new Hashtable();
  +      Hashtable lProperties = pParent.getKeyPropertyList();
  +      lReturn.put( J2EEServer.J2EE_TYPE, lProperties.get( "name" ) );
  +      
  +      return lReturn;
  +   }
      
      // Private -------------------------------------------------------
      
  
  
  
  1.2       +17 -10    
jboss-management/src/main/org/jboss/management/j2ee/J2EEManagedObject.java
  
  Index: J2EEManagedObject.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss-management/src/main/org/jboss/management/j2ee/J2EEManagedObject.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- J2EEManagedObject.java    11 Mar 2002 04:31:32 -0000      1.1
  +++ J2EEManagedObject.java    16 Mar 2002 06:44:56 -0000      1.2
  @@ -23,7 +23,7 @@
    * {@link javax.management.j2ee.J2EEManagedObject J2EEManagedObject}.
    *
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Andreas Schaefer</a>.
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    *   
    * <p><b>Revisions:</b>
    *
  @@ -122,14 +122,13 @@
            MalformedObjectNameException,
            InvalidParentException
      {
  -      Hashtable lProperties = (Hashtable) pParent.getKeyPropertyList().clone();
  -      lProperties.put( lProperties.get( TYPE ), lProperties.get( "name" ) );
  +      Hashtable lProperties = getParentKeys( pParent );
         lProperties.put( TYPE, pType );
         lProperties.put( NAME, pName );
         mName = new ObjectName( getDomainName(), lProperties );
         setParent( pParent );
      }
  -
  +   
      // Public --------------------------------------------------------
      
      // J2EEManagedObjectMBean implementation 
----------------------------------------------
  @@ -178,12 +177,6 @@
   
      // J2EEManagedObject implementation 
----------------------------------------------
      
  -/*
  -   public String getName() {
  -      return mName.toString();
  -   }
  -*/
  -   
      /**
       * @jmx:managed-attribute
       **/
  @@ -285,6 +278,20 @@
      }
      
      protected void preDestruction() {
  +   }
  +   
  +   /**
  +    * This method can be overwritten by any subclass which must
  +    * return &lt;parent-j2eeType&gt; indicating its parents. By
  +    * default it returns an empty hashtable instance.
  +    *
  +    * @param pParent The direct parent of this class
  +    *
  +    * @return An empty hashtable
  +    **/
  +   protected Hashtable getParentKeys( ObjectName pParent ) {
  +      System.out.println( "------------------>>>>>>>>>>>> J2EEManagedObject return 
empty hashtable" );
  +      return new Hashtable();
      }
      
      // Private -------------------------------------------------------
  
  
  
  1.2       +14 -1     
jboss-management/src/main/org/jboss/management/j2ee/J2EEResource.java
  
  Index: J2EEResource.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss-management/src/main/org/jboss/management/j2ee/J2EEResource.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- J2EEResource.java 11 Mar 2002 04:31:32 -0000      1.1
  +++ J2EEResource.java 16 Mar 2002 06:44:56 -0000      1.2
  @@ -6,6 +6,8 @@
    */
   package org.jboss.management.j2ee;
   
  +import java.util.Hashtable;
  +
   import javax.management.MalformedObjectNameException;
   import javax.management.ObjectName;
   
  @@ -14,7 +16,7 @@
    * {@link javax.management.j2ee.J2EEResource J2EEResource}.
    *
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Andreas Schaefer</a>.
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    *   
    * <p><b>Revisions:</b>
    *
  @@ -57,6 +59,17 @@
      // Package protected ---------------------------------------------
      
      // Protected -----------------------------------------------------
  +   
  +   /**
  +    * @return A hashtable with the J2EE Server as parent
  +    **/
  +   protected Hashtable getParentKeys( ObjectName pParent ) {
  +      Hashtable lReturn = new Hashtable();
  +      Hashtable lProperties = pParent.getKeyPropertyList();
  +      lReturn.put( J2EEServer.J2EE_TYPE, lProperties.get( "name" ) );
  +      
  +      return lReturn;
  +   }
      
      // Private -------------------------------------------------------
      
  
  
  
  1.3       +16 -1     
jboss-management/src/main/org/jboss/management/j2ee/JCAConnectionFactory.java
  
  Index: JCAConnectionFactory.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss-management/src/main/org/jboss/management/j2ee/JCAConnectionFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JCAConnectionFactory.java 13 Mar 2002 04:42:05 -0000      1.2
  +++ JCAConnectionFactory.java 16 Mar 2002 06:44:56 -0000      1.3
  @@ -6,6 +6,7 @@
    */
   package org.jboss.management.j2ee;
   
  +import java.util.Hashtable;
   import java.util.Set;
   
   import javax.management.AttributeChangeNotification;
  @@ -24,7 +25,7 @@
    * {@link javax.management.j2ee.JCAConnectionFactory JCAConnectionFactory}.
    *
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Scott McLaughlin</a>.
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    *   
    * <p><b>Revisions:</b>
    *
  @@ -286,6 +287,20 @@
      // Package protected ---------------------------------------------
      
      // Protected -----------------------------------------------------
  +   
  +   /**
  +    * @return A hashtable with the JCA-Resource and J2EE-Server as parent
  +    **/
  +   protected Hashtable getParentKeys( ObjectName pParent ) {
  +      Hashtable lReturn = new Hashtable();
  +      Hashtable lProperties = pParent.getKeyPropertyList();
  +      lReturn.put( JCAResource.J2EE_TYPE, lProperties.get( "name" ) );
  +      // J2EE-Server is already parent of J2EE-Application therefore lookup
  +      // the name by the J2EE-Server type
  +      lReturn.put( J2EEServer.J2EE_TYPE, lProperties.get( J2EEServer.J2EE_TYPE ) );
  +      
  +      return lReturn;
  +   }
      
      // Private -------------------------------------------------------
      
  
  
  
  1.3       +16 -1     
jboss-management/src/main/org/jboss/management/j2ee/JDBCDataSource.java
  
  Index: JDBCDataSource.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss-management/src/main/org/jboss/management/j2ee/JDBCDataSource.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JDBCDataSource.java       13 Mar 2002 04:42:05 -0000      1.2
  +++ JDBCDataSource.java       16 Mar 2002 06:44:56 -0000      1.3
  @@ -6,6 +6,7 @@
    */
   package org.jboss.management.j2ee;
   
  +import java.util.Hashtable;
   import java.util.Set;
   
   import javax.management.AttributeChangeNotification;
  @@ -24,7 +25,7 @@
    * {@link javax.management.j2ee.JDBCDataSource JDBCDataSource}.
    *
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Andreas Schaefer</a>.
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    *   
    * <p><b>Revisions:</b>
    *
  @@ -282,6 +283,20 @@
      // Package protected ---------------------------------------------
      
      // Protected -----------------------------------------------------
  +   
  +   /**
  +    * @return A hashtable with the JDBC-Resource and J2EE-Server as parent
  +    **/
  +   protected Hashtable getParentKeys( ObjectName pParent ) {
  +      Hashtable lReturn = new Hashtable();
  +      Hashtable lProperties = pParent.getKeyPropertyList();
  +      lReturn.put( JDBCResource.J2EE_TYPE, lProperties.get( "name" ) );
  +      // J2EE-Server is already parent of J2EE-Application therefore lookup
  +      // the name by the J2EE-Server type
  +      lReturn.put( J2EEServer.J2EE_TYPE, lProperties.get( J2EEServer.J2EE_TYPE ) );
  +      
  +      return lReturn;
  +   }
      
      // Private -------------------------------------------------------
      
  
  
  
  1.2       +14 -1     jboss-management/src/main/org/jboss/management/j2ee/JVM.java
  
  Index: JVM.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss-management/src/main/org/jboss/management/j2ee/JVM.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JVM.java  11 Mar 2002 04:31:32 -0000      1.1
  +++ JVM.java  16 Mar 2002 06:44:56 -0000      1.2
  @@ -6,6 +6,8 @@
    */
   package org.jboss.management.j2ee;
   
  +import java.util.Hashtable;
  +
   import javax.management.MalformedObjectNameException;
   import javax.management.ObjectName;
   
  @@ -14,7 +16,7 @@
    * {@link javax.management.j2ee.JVM JVM}.
    *
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Andreas Schaefer</a>.
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    *   
    * <p><b>Revisions:</b>
    *
  @@ -95,6 +97,17 @@
      // Package protected ---------------------------------------------
      
      // Protected -----------------------------------------------------
  +   
  +   /**
  +    * @return A hashtable with the J2EE Server as parent
  +    **/
  +   protected Hashtable getParentKeys( ObjectName pParent ) {
  +      Hashtable lReturn = new Hashtable();
  +      Hashtable lProperties = pParent.getKeyPropertyList();
  +      lReturn.put( J2EEServer.J2EE_TYPE, lProperties.get( "name" ) );
  +      
  +      return lReturn;
  +   }
      
      // Private -------------------------------------------------------
      
  
  
  
  1.2       +27 -2     
jboss-management/src/main/org/jboss/management/j2ee/ResourceAdapter.java
  
  Index: ResourceAdapter.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss-management/src/main/org/jboss/management/j2ee/ResourceAdapter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ResourceAdapter.java      11 Mar 2002 04:31:32 -0000      1.1
  +++ ResourceAdapter.java      16 Mar 2002 06:44:56 -0000      1.2
  @@ -6,6 +6,8 @@
    */
   package org.jboss.management.j2ee;
   
  +import java.util.Hashtable;
  +
   import javax.management.MalformedObjectNameException;
   import javax.management.MBeanServer;
   import javax.management.ObjectName;
  @@ -17,7 +19,7 @@
    * {@link javax.management.j2ee.ResourceAdapter ResourceAdapter}.
    *
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Scott McLaughlin</a>.
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    *   
    * <p><b>Revisions:</b>
    *
  @@ -106,5 +108,28 @@
      public String toString() {
         return "ResourceAdapter { " + super.toString() + " } []";
      }
  +   
  +   // Package protected ---------------------------------------------
  +   
  +   // Protected -----------------------------------------------------
  +   
  +   /**
  +    * @return A hashtable with the Resource-Adapter-Module, J2EE-Application and 
J2EE-Server as parent
  +    **/
  +   protected Hashtable getParentKeys( ObjectName pParent ) {
  +      Hashtable lReturn = new Hashtable();
  +      Hashtable lProperties = pParent.getKeyPropertyList();
  +      lReturn.put( ResourceAdapterModule.J2EE_TYPE, lProperties.get( "name" ) );
  +      // J2EE-Application and J2EE-Server is already parent of J2EE-Application 
therefore lookup
  +      // the name by the J2EE-Server type
  +      lReturn.put( J2EEApplication.J2EE_TYPE, lProperties.get( 
J2EEApplication.J2EE_TYPE ) );
  +      lReturn.put( J2EEServer.J2EE_TYPE, lProperties.get( J2EEServer.J2EE_TYPE ) );
  +      
  +      return lReturn;
  +   }
  +   
  +   // Private -------------------------------------------------------
  +   
  +   // Inner classes -------------------------------------------------
  +   
   }
  -
  
  
  
  1.3       +16 -1     
jboss-management/src/main/org/jboss/management/j2ee/ResourceAdapterModule.java
  
  Index: ResourceAdapterModule.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss-management/src/main/org/jboss/management/j2ee/ResourceAdapterModule.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ResourceAdapterModule.java        13 Mar 2002 04:42:05 -0000      1.2
  +++ ResourceAdapterModule.java        16 Mar 2002 06:44:56 -0000      1.3
  @@ -10,6 +10,7 @@
   import java.util.Arrays;
   import java.util.ArrayList;
   import java.util.HashMap;
  +import java.util.Hashtable;
   import java.util.List;
   import java.util.Map;
   
  @@ -31,7 +32,7 @@
    * {@link javax.management.j2ee.ResourceAdapterModule ResourceAdapterModule}.
    *
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Scott McLaughlin</a>.
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    *   
    * <p><b>Revisions:</b>
    *
  @@ -367,6 +368,20 @@
      // Package protected ---------------------------------------------
      
      // Protected -----------------------------------------------------
  +   
  +   /**
  +    * @return A hashtable with the J2EE-Application and J2EE-Server as parent
  +    **/
  +   protected Hashtable getParentKeys( ObjectName pParent ) {
  +      Hashtable lReturn = new Hashtable();
  +      Hashtable lProperties = pParent.getKeyPropertyList();
  +      lReturn.put( J2EEApplication.J2EE_TYPE, lProperties.get( "name" ) );
  +      // J2EE-Server is already parent of J2EE-Application therefore lookup
  +      // the name by the J2EE-Server type
  +      lReturn.put( J2EEServer.J2EE_TYPE, lProperties.get( J2EEServer.J2EE_TYPE ) );
  +      
  +      return lReturn;
  +   }
      
      // Private -------------------------------------------------------
      
  
  
  
  1.2       +27 -1     jboss-management/src/main/org/jboss/management/j2ee/Servlet.java
  
  Index: Servlet.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss-management/src/main/org/jboss/management/j2ee/Servlet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Servlet.java      11 Mar 2002 04:31:32 -0000      1.1
  +++ Servlet.java      16 Mar 2002 06:44:56 -0000      1.2
  @@ -6,6 +6,8 @@
    */
   package org.jboss.management.j2ee;
   
  +import java.util.Hashtable;
  +
   import javax.management.MalformedObjectNameException;
   import javax.management.MBeanServer;
   import javax.management.ObjectName;
  @@ -17,7 +19,7 @@
    * {@link javax.management.j2ee.Servlet Servlet}.
    *
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Andreas Schaefer</a>.
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    *   
    * <p><b>Revisions:</b>
    *
  @@ -60,4 +62,28 @@
      public String toString() {
         return "Servlet { " + super.toString() + " } []";
      }
  +   
  +   // Package protected ---------------------------------------------
  +   
  +   // Protected -----------------------------------------------------
  +   
  +   /**
  +    * @return A hashtable with the Web-Module, J2EE-Application and J2EE-Server as 
parent
  +    **/
  +   protected Hashtable getParentKeys( ObjectName pParent ) {
  +      Hashtable lReturn = new Hashtable();
  +      Hashtable lProperties = pParent.getKeyPropertyList();
  +      lReturn.put( WebModule.J2EE_TYPE, lProperties.get( "name" ) );
  +      // J2EE-Application and J2EE-Server is already parent of J2EE-Application 
therefore lookup
  +      // the name by the J2EE-Server type
  +      lReturn.put( J2EEApplication.J2EE_TYPE, lProperties.get( 
J2EEApplication.J2EE_TYPE ) );
  +      lReturn.put( J2EEServer.J2EE_TYPE, lProperties.get( J2EEServer.J2EE_TYPE ) );
  +      
  +      return lReturn;
  +   }
  +   
  +   // Private -------------------------------------------------------
  +   
  +   // Inner classes -------------------------------------------------
  +   
   }
  
  
  
  1.2       +16 -1     
jboss-management/src/main/org/jboss/management/j2ee/WebModule.java
  
  Index: WebModule.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss-management/src/main/org/jboss/management/j2ee/WebModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WebModule.java    11 Mar 2002 04:31:32 -0000      1.1
  +++ WebModule.java    16 Mar 2002 06:44:56 -0000      1.2
  @@ -8,6 +8,7 @@
   
   import java.util.Arrays;
   import java.util.ArrayList;
  +import java.util.Hashtable;
   import java.util.List;
   
   import javax.management.MalformedObjectNameException;
  @@ -20,7 +21,7 @@
    * {@link javax.management.j2ee.WebModule WebModule}.
    *
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Andreas Schaefer</a>.
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    *   
    * <p><b>Revisions:</b>
    *
  @@ -102,6 +103,20 @@
      // Package protected ---------------------------------------------
      
      // Protected -----------------------------------------------------
  +   
  +   /**
  +    * @return A hashtable with the J2EE-Application and J2EE-Server as parent
  +    **/
  +   protected Hashtable getParentKeys( ObjectName pParent ) {
  +      Hashtable lReturn = new Hashtable();
  +      Hashtable lProperties = pParent.getKeyPropertyList();
  +      lReturn.put( J2EEApplication.J2EE_TYPE, lProperties.get( "name" ) );
  +      // J2EE-Server is already parent of J2EE-Application therefore lookup
  +      // the name by the J2EE-Server type
  +      lReturn.put( J2EEServer.J2EE_TYPE, lProperties.get( J2EEServer.J2EE_TYPE ) );
  +      
  +      return lReturn;
  +   }
      
      // Private -------------------------------------------------------
      
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to