Package org.jnp.interfaces

Examples of org.jnp.interfaces.NamingContext


/*    */   static NamingServer root;
/*    */
/*    */   public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment)
/*    */     throws Exception
/*    */   {
/* 70 */     return new NamingContext(environment, name, root);
/*    */   }
View Full Code Here


/*    */   public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment)
/*    */     throws Exception
/*    */   {
/* 57 */     if (obj == null)
/*    */     {
/* 59 */       Context urlContext = new NamingContext(environment, name, null);
/* 60 */       return urlContext;
/*    */     }
/* 62 */     if ((obj instanceof String))
/*    */     {
/* 64 */       String url = (String)obj;
/* 65 */       Context ctx = new NamingContext(environment, name, null);
/*    */
/* 67 */       Name n = ctx.getNameParser(name).parse(url.substring(url.indexOf(":") + 1));
/* 68 */       if (n.size() >= 3)
/*    */       {
/* 71 */         if ((n.get(0).toString().equals("")) && (n.get(1).toString().equals("")))
/*    */         {
/* 74 */           ctx.addToEnvironment("java.naming.provider.url", n.get(2));
/*    */         }
/*    */       }
/* 77 */       return ctx;
/*    */     }
/*    */
View Full Code Here

      }
  
      if (name.isEmpty())
      {
         // Return this
         return new NamingContext(null, parser.parse(""), this.getHAStub());
      }

      // is the name a context?
      try
      {
         Node<String, Binding> n = this.m_cache.getRoot().getChild(Fqn.fromRelativeFqn(this.m_root, Fqn.fromString(name.toString())));
         if (n != null)
         {
            Name fullName = (Name) name.clone();
            return new NamingContext(null, fullName, this.getHAStub());
         }
      }
      catch (CacheException ce)
      {
         // don't chain CacheException since JBoss Cache may not be on remote client's classpath
View Full Code Here

               for (Object obj: children)
               {
                  String child = (String) obj;
                  Name fullName = (Name) name.clone();
                  fullName.add(child);
                  NamingContext subCtx = new NamingContext(null, fullName, this.getHAStub());
                  list.add(new Binding(child, NamingContext.class.getName(), subCtx, true));
               }
            }
         }
        
View Full Code Here

      }
  
      Name fullName = parser.parse("");
      fullName.addAll(name);
     
      return new NamingContext(null, fullName, this.getHAStub());
   }
View Full Code Here

      }
  
      if (name.isEmpty())
      {
         // Return this
         return new NamingContext(null, PARSER.parse(""), this.getHAStub());
      }

      // is the name a context?
      try
      {
         Node<String, Binding> n = this.cache.getRoot().getChild(Fqn.fromRelativeFqn(FQN_ROOT, Fqn.fromString(name.toString())));
         if (n != null)
         {
            Name fullName = (Name) name.clone();
            return new NamingContext(null, fullName, this.getHAStub());
         }
      }
      catch (CacheException ce)
      {
         // don't chain CacheException since Infinispan may not be on remote client's classpath
View Full Code Here

               for (Object obj: children)
               {
                  String child = (String) obj;
                  Name fullName = (Name) name.clone();
                  fullName.add(child);
                  NamingContext subCtx = new NamingContext(null, fullName, this.getHAStub());
                  list.add(new Binding(child, NamingContext.class.getName(), subCtx, true));
               }
            }
         }
        
View Full Code Here

      }
  
      Name fullName = PARSER.parse("");
      fullName.addAll(name);
     
      return new NamingContext(null, fullName, this.getHAStub());
   }
View Full Code Here

      }
  
      if (name.isEmpty())
      {
         // Return this
         return new NamingContext(null, PARSER.parse(""), this.getHAStub());
      }

      // is the name a context?
      try
      {
         Node<String, Binding> n = this.cache.getRoot().getChild(Fqn.fromRelativeFqn(FQN_ROOT, Fqn.fromString(name.toString())));
         if (n != null)
         {
            Name fullName = (Name) name.clone();
            return new NamingContext(null, fullName, this.getHAStub());
         }
      }
      catch (CacheException ce)
      {
         // don't chain CacheException since Infinispan may not be on remote client's classpath
View Full Code Here

               for (Object obj: children)
               {
                  String child = (String) obj;
                  Name fullName = (Name) name.clone();
                  fullName.add(child);
                  NamingContext subCtx = new NamingContext(null, fullName, this.getHAStub());
                  list.add(new Binding(child, NamingContext.class.getName(), subCtx, true));
               }
            }
         }
        
View Full Code Here

TOP

Related Classes of org.jnp.interfaces.NamingContext

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.