Package javax.naming

Examples of javax.naming.MalformedLinkException


import junit.framework.TestCase;

public class MalformedLinkExceptionTest extends TestCase {

  public void testSetLinkResolvedName() throws InvalidNameException {
    MalformedLinkException ex = new MalformedLinkException("Test");
    Properties env = new Properties();
    env.put("jndi.syntax.direction", "flat");
    Name name = new CompoundName("Test", env);
    ex.setLinkResolvedName(name);
    ex.setLinkResolvedName(null);
    assertNull(ex.getLinkResolvedName());
  }
View Full Code Here


    ex.setLinkResolvedName(null);
    assertNull(ex.getLinkResolvedName());
  }

  public void testSetLinkRemainingName() throws InvalidNameException {
    MalformedLinkException ex = new MalformedLinkException("Test");
    Properties env = new Properties();
    env.put("jndi.syntax.direction", "flat");
    Name name = new CompoundName("Test", env);
    ex.setLinkRemainingName(name);
    ex.setLinkRemainingName(null);
    assertNull(ex.getLinkRemainingName());
  }
View Full Code Here

         {
            Object content = refAddr.getContent();
            if (content != null && content instanceof String)
               return (String) content;
            else
               throw new MalformedLinkException("Content is not a string: " + content);
         }
         else
            throw new MalformedLinkException("RefAddr is not a string reference: " + refAddr);
      }
      else
         throw new MalformedLinkException("Class is not a LinkRefPair: " + className);
   }
View Full Code Here

         {
            Object content = refAddr.getContent();
            if (content != null && content instanceof String)
               return (String) content;
            else
               throw new MalformedLinkException("Content is not a string: " + content);
         }
         else
            throw new MalformedLinkException("RefAddr is not a string reference: " + refAddr);
      }
      else
         throw new MalformedLinkException("Class is not a LinkRefPair: " + className);
   }
View Full Code Here

         {
            Object content = refAddr.getContent();
            if (content != null && content instanceof String)
               return (String) content;
            else
               throw new MalformedLinkException("Content is not a string: " + content);
         }
         else
            throw new MalformedLinkException("RefAddr is not a string reference: " + refAddr);
      }
      else
         throw new MalformedLinkException("Class is not a LinkRefPair: " + className);
   }
View Full Code Here

/*     */       {
/* 116 */         Object content = refAddr.getContent();
/* 117 */         if ((content != null) && ((content instanceof String))) {
/* 118 */           return (String)content;
/*     */         }
/* 120 */         throw new MalformedLinkException("Content is not a string: " + content);
/*     */       }
/*     */
/* 123 */       throw new MalformedLinkException("RefAddr is not a string reference: " + refAddr);
/*     */     }
/*     */
/* 126 */     throw new MalformedLinkException("Class is not a LinkRefPair: " + this.className);
/*     */   }
View Full Code Here

/*     */       {
/* 142 */         Object content = refAddr.getContent();
/* 143 */         if ((content != null) && ((content instanceof String))) {
/* 144 */           return (String)content;
/*     */         }
/* 146 */         throw new MalformedLinkException("Content is not a string: " + content);
/*     */       }
/*     */
/* 149 */       throw new MalformedLinkException("RefAddr is not a string reference: " + refAddr);
/*     */     }
/*     */
/* 152 */     throw new MalformedLinkException("Class is not a LinkRefPair: " + this.className);
/*     */   }
View Full Code Here

TOP

Related Classes of javax.naming.MalformedLinkException

Copyright © 2018 www.massapicom. 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.