Package javax.naming

Examples of javax.naming.Context.createSubcontext()


            final ParsedName parsedName = parse(name);
            final Context namespaceContext = findContext(name, parsedName);
            if (namespaceContext == null)
                return super.createSubcontext(parsedName.remaining());
            else
                return namespaceContext.createSubcontext(parsedName.remaining());
        }
    }
}
View Full Code Here


    try {
      Context context = getContext();

      // Create a subcontext for portal-wide services, initialize services
      // Start any portal services configured in services.xml
      ExternalServices.startServices(context.createSubcontext("services"));

      /*
      // Note: this should be moved into a common service init
      // Bind in the logger service
      LogService logger = LogService.instance();
View Full Code Here

      LogService logger = LogService.instance();
      context.bind("/services/logger", logger);
      */

      // Create a subcontext for user specific bindings
      context.createSubcontext("users");

      // Create a subcontext for session listings
      context.createSubcontext("sessions");

      log.debug("JNDIManager::initializePortalContext() : initialized portal JNDI context");
View Full Code Here

      // Create a subcontext for user specific bindings
      context.createSubcontext("users");

      // Create a subcontext for session listings
      context.createSubcontext("sessions");

      log.debug("JNDIManager::initializePortalContext() : initialized portal JNDI context");

    } catch (Exception e) {
      log.error("Error initializing Portal context", e);
View Full Code Here

          throw new PortalException("JNDIManager.initializeSessionContext(): error encountered while trying to bind /users/"+userId+"/sessions/"+sessionId+"/layoutId",e);
      }

      // make sure channel-obj context exists
      try {
          sessionIdContext.createSubcontext("channel-obj");
      } catch (Exception e) {};

      try {
          // check if the layout id binding already exists
          try {
View Full Code Here

              // assume layouts/[layoutId]/ has already been populated

              // bind layouts/[layoutId]/sessions/[sessionId]
              try {
                  Context lsessionsContext=(Context)userIdContext.lookup("layouts/"+layoutId+"/sessions");
                  lsessionsContext.createSubcontext(sessionId);

                  if (log.isDebugEnabled())
                  log.debug("JNDIManager.initializeSessionContext(): " +
                        "created /users/"+userId+"/layouts/"+layoutId+"/sessions/"+sessionId);
View Full Code Here

              // given layout id has not been registered yet
              Context layoutIdContext=layoutsContext.createSubcontext(layoutId);

              // bind layouts/[layoutId]/sessions/[sessionId] context
              Context lsessionsContext=layoutIdContext.createSubcontext("sessions");
              lsessionsContext.createSubcontext(sessionId);

              if (log.isDebugEnabled())
                  log.debug("JNDIManager.initializeSessionContext(): " +
                        "created context /users/"+userId+"/layouts/"+layoutId);
View Full Code Here

                          String subContextName = new String();
                          while (e.hasMoreElements()) {
                              subContextName = (String)e.nextElement();
                              if (e.hasMoreElements()) {
                                  // Bind a new sub context if the current name component is not the leaf
                                  nextContext = nextContext.createSubcontext(subContextName);
                              } else {
                                  //System.out.println("Binding " + instanceid.getNodeValue() + " to " + nextContext.getNameInNamespace() + "/" + subContextName);
                                  if (log.isDebugEnabled())
                                      log.debug("JNDIManager.initializeSessionContext(): " +
                                            "bound "+instanceid.getNodeValue() + " to " +
View Full Code Here

      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

      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.