[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/detection/jndi ...

Tom Elrod tom.elrod at jboss.com
Wed Jul 19 12:39:17 EDT 2006


  User: telrod  
  Date: 06/07/19 12:39:17

  Modified:    src/main/org/jboss/remoting/detection/jndi 
                        JNDIDetector.java
  Log:
  JBREM-507 - updating/adding javadoc for configuration properties.
  
  Revision  Changes    Path
  1.13      +26 -4     JBossRemoting/src/main/org/jboss/remoting/detection/jndi/JNDIDetector.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: JNDIDetector.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/detection/jndi/JNDIDetector.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -b -r1.12 -r1.13
  --- JNDIDetector.java	3 Jul 2006 18:55:32 -0000	1.12
  +++ JNDIDetector.java	19 Jul 2006 16:39:17 -0000	1.13
  @@ -81,6 +81,8 @@
   
      public static final String DETECTION_SUBCONTEXT_NAME = "detection";
   
  +   private String subContextName = DETECTION_SUBCONTEXT_NAME;
  +
      /**
       * Indicates the number of time will detect before doing check to see if server still alive.
       */
  @@ -139,6 +141,26 @@
      }
   
      /**
  +    * Sets the sub context name under which detection messages will be bound
  +    * and looked up.
  +    * @param subContextName
  +    */
  +   public void setSubContextName(String subContextName)
  +   {
  +      this.subContextName = subContextName;
  +   }
  +
  +   /**
  +    * Gets the sub context name under which detection messages will be bound and
  +    * looked up.
  +    * @return
  +    */
  +   public String getSubContextName()
  +   {
  +      return this.subContextName;
  +   }
  +
  +   /**
       * The context factory string to use when connecting to the JNDI server.
       * Should be a qualified class name for JNDI client.
       *
  @@ -431,18 +453,18 @@
         InitialContext initialContext = new InitialContext(env);
         try
         {
  -         context = (Context) initialContext.lookup(DETECTION_SUBCONTEXT_NAME);
  +         context = (Context) initialContext.lookup(subContextName);
         }
         catch(NamingException e)
         {
            try
            {
  -            context = initialContext.createSubcontext(DETECTION_SUBCONTEXT_NAME);
  +            context = initialContext.createSubcontext(subContextName);
            }
            catch(NameAlreadyBoundException e1)
            {
  -            log.debug("The sub context " + DETECTION_SUBCONTEXT_NAME + " was created before we could.");
  -            context = (Context) initialContext.lookup(DETECTION_SUBCONTEXT_NAME);
  +            log.debug("The sub context " + subContextName + " was created before we could.");
  +            context = (Context) initialContext.lookup(subContextName);
            }
         }
      }
  
  
  



More information about the jboss-cvs-commits mailing list