Package javax.naming

Examples of javax.naming.Context.createSubcontext()


        final ResolveResult resolveResult = getBaseURLContext( name, getRawEnvironment() );
        final Context context = (Context)resolveResult.getResolvedObj();

        try
        {
            return context.createSubcontext( resolveResult.getRemainingName() );
        }
        finally
        {
            context.close();
        }
View Full Code Here


         if (binding != null && !binding.equals(""))
         {
            final Context context = node.getContextFactory().createContext();

            context.createSubcontext(binding);
            context.close();

            Hermes.ui.getDefaultMessageSink().add("Subcontext " + binding + " created.");
         }
         else
View Full Code Here

    protected void performTask(HttpServletRequest request, HttpServletResponse response){
        try {
            PrintWriter pw = response.getWriter();
            try {
                Context ctx = new InitialContext();
                ctx.createSubcontext("foo");
                ctx.bind("foo/bar", "value");
                String value = (String) ctx.lookup("foo/bar");
                if ("value".equals(value)) {
                    pw.println("Value bound and retrieved from jndi default context");
                } else{
View Full Code Here

            result.lookup("java:comp/env");
        }
        catch(NameNotFoundException e)
        {
            compContext = result.createSubcontext("comp");
            compContext.createSubcontext("env");
        }
        return result;
    }

    /**
 
View Full Code Here

      JNDIUtils.createSubcontexts( servicesContext, serviceName );

      try
      {
         newContext = new NamingContext( servicesContext.createSubcontext( serviceName ),
                                         this.engine );
         LOG.debug( "Created new subcontext with name: " + serviceName );
      }
      catch ( Exception e )
      {
View Full Code Here

      catch ( NameNotFoundException e )
      {
         LOG.debug("Creating SubContext: " + JndiConstants.CONTEXT_NAME_BASE);
         compContext = result.createSubcontext( JndiConstants.CONTEXT_NAME_BASE );
         LOG.debug("Creating SubContext: " + JndiConstants.CONTEXT_SERVICES_BASE);
         compContext.createSubcontext( JndiConstants.CONTEXT_SERVICES_BASE );
          LOG.debug("Creating SubContext: " + JndiConstants.CONTEXT_GLOBAL_BASE);
         compContext.createSubcontext( JndiConstants.CONTEXT_GLOBAL_BASE );
      }

      return result;
View Full Code Here

         LOG.debug("Creating SubContext: " + JndiConstants.CONTEXT_NAME_BASE);
         compContext = result.createSubcontext( JndiConstants.CONTEXT_NAME_BASE );
         LOG.debug("Creating SubContext: " + JndiConstants.CONTEXT_SERVICES_BASE);
         compContext.createSubcontext( JndiConstants.CONTEXT_SERVICES_BASE );
          LOG.debug("Creating SubContext: " + JndiConstants.CONTEXT_GLOBAL_BASE);
         compContext.createSubcontext( JndiConstants.CONTEXT_GLOBAL_BASE );
      }

      return result;
   }
View Full Code Here

            throw portalException;
        }

        // make sure channel-obj context exists
        try {
            sessionIdContext.createSubcontext("channel-obj");
        }
        catch (NameAlreadyBoundException nabe) {
            // ignore
        }
        catch (NamingException ne) {
View Full Code Here

                this.logger.error(portalException.getMessage(), ne);
                throw portalException;
            }
           
            try {
                layoutSessionsContext.createSubcontext(sessionId);

                if (this.logger.isDebugEnabled()) {
                    this.logger.debug("Created Context '/users/" + userId + "/layouts/" + layoutId + "/sessions/" + sessionId + "'");
                }
            }
View Full Code Here

                // given layout id has not been registered yet
                layoutIdContext = layoutsContext.createSubcontext(layoutId);
   
                // bind layouts/[layoutId]/sessions/[sessionId] context
                final Context layoutSessionsContext = layoutIdContext.createSubcontext("sessions");
                layoutSessionsContext.createSubcontext(sessionId);
   
                if (this.logger.isDebugEnabled()) {
                    this.logger.debug("Created Context '/users/" + userId + "/layouts/" + layoutId + "'");
                }
            }
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.