Examples of createSubcontext()


Examples of javax.naming.Context.createSubcontext()

    ResolveResult r = findContextFor(name);
    Context ctx = (Context) r.getResolvedObj();
    String rname = r.getRemainingName().toString();
   
    // create subcontext
    return ctx.createSubcontext(rname);
  }

  /**
   * Retrieves the named object, following links except
   * for the terminal atomic component of the name.
View Full Code Here

Examples of javax.naming.Context.createSubcontext()

                    Name fullName = new CompositeName(name);
                    Context currentContext = ic;
                    while (fullName.size() > 1) {
                        // Make contexts that are not already present
                        try {
                            currentContext = currentContext
                                    .createSubcontext(fullName.get(0));
                        } catch (NamingException err) {
                            currentContext = (Context) currentContext
                                    .lookup(fullName.get(0));
                        }
View Full Code Here

Examples of javax.naming.Context.createSubcontext()

         }
         catch(NameNotFoundException e)
         {
            // OK
         }
         crtContext = crtContext.createSubcontext(tok);
      }
      return crtContext;
   }

   public static void tearDownRecursively(Context c) throws Exception
View Full Code Here

Examples of javax.naming.Context.createSubcontext()

            // Add comp
            Context compContext = createSubcontext("comp");

            // Add comp/env
            compContext.createSubcontext("env");

            // module is the same than comp
            this.bindings.put("module", compContext);

            // App context
View Full Code Here

Examples of javax.naming.Context.createSubcontext()

            try {
                subctx = lookupCtx(newName);
            } catch (NameNotFoundException e) {
                subctx = createSubcontext(newName);
            }
            ctx = subctx.createSubcontext(suffix);
        }
        return ctx;
    }

    /**
 
View Full Code Here

Examples of javax.naming.Context.createSubcontext()

   }

   public void create() throws Exception
   {
      Context context = createContext();
      beanManagerContext = context.createSubcontext(JndiUtils.BEAN_MANAGER_GLOBAL_SUBCONTEXT);
   }

   protected Context getBeanManagerContext()
   {
      return beanManagerContext;
View Full Code Here

Examples of javax.naming.Context.createSubcontext()

         }

         // TODO: injection, Add a link to the global transaction manager
         envCtx.bind("UserTransaction", new LinkRef("UserTransaction"));
         log.debug("Linked java:comp/UserTransaction to JNDI name: UserTransaction");
         envCtx = envCtx.createSubcontext("env");
         processEncReferences(webApp, envCtx);
      }
      finally
      {
         currentThread.setContextClassLoader(currentLoader);
View Full Code Here

Examples of javax.naming.Context.createSubcontext()

      }

      param = parameters[0];
      if (param instanceof AnyName) {
        return new AnyNamingContext(
          ctx.createSubcontext((Name)param.toObject()));
      } else {
        return new AnyNamingContext(
          ctx.createSubcontext(param.toString()));
      }
     
View Full Code Here

Examples of javax.naming.Context.createSubcontext()

      if (param instanceof AnyName) {
        return new AnyNamingContext(
          ctx.createSubcontext((Name)param.toObject()));
      } else {
        return new AnyNamingContext(
          ctx.createSubcontext(param.toString()));
      }
     
    } catch (NamingException e) {
      throw context.exception(e);
    }
View Full Code Here

Examples of javax.naming.Context.createSubcontext()

      Name name = ictx.getNameParser( jndiName ).parse( jndiName );
      Context ctx = ictx;
      for (int i = 0, max = name.size() - 1; i < max; i++)
      {
    try
    { ctx = ctx.createSubcontext( name.get( i ) ); }
    catch (NameAlreadyBoundException ignore)
    { ctx = (Context) ctx.lookup( name.get( i ) ); }
      }

       ictx.rebind( jndiName, combods );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.