Package org.jnp.interfaces

Examples of org.jnp.interfaces.NamingContext


         throw ex;
      }

      // Copy the context env
      env = (Hashtable) env.clone();
      return new NamingContext(env, null, namingServer);
   }
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(new Fqn<String>(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

         Interceptor[] tmp = {IsLocalInterceptor.singleton, InvokeRemoteInterceptor.singleton};
         interceptors = tmp;
      }

      Naming local = NamingContext.getLocal();
      if (local != null) return new NamingContext(env, null, local);

      String providerUrl = (String) env.get(Context.PROVIDER_URL);
      if (providerUrl == null)
      {
         throw new RuntimeException("PROVIDER_URL not provided in jndi.properties.  Automatic discovery not implemented yet.");
      }
      try
      {
         naming = (Naming) Remoting.createPojiProxy("JNDI", interfaces, providerUrl, interceptors);
      }
      catch (Exception e)
      {
         throw new RuntimeException("Unable to create Naming proxy", e);
      }

      return new NamingContext(env, null, naming);
   }
View Full Code Here

      log.info("invoke, opName="+opName);
      Object value = invocation.nextInterceptor().invoke(invocation);
      if( value instanceof NamingContext )
      {
         initNamingProxy();
         NamingContext ctx = (NamingContext) value;
         ctx.setNaming(proxy);
      }
      return value;
   }
View Full Code Here

         throw ex;
      }

      // Copy the context env
      env = (Hashtable) env.clone();
      return new NamingContext(env, null, namingServer);
   }
View Full Code Here

      public Context getInitialContext(Hashtable env)
         throws NamingException
      {
         Hashtable env2 = (Hashtable) env.clone();
         env2.remove(Context.PROVIDER_URL);
         return new NamingContext(env2, null, null);
      }
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(new Fqn<String>(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

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.