sessionid_namespacej
351551
static function switchToRequestedNamespace($default_namespace)
    {
        $session_name = $default_namespace;

        // Check for Posted Session Name and use that if specified
        if (isset($_REQUEST['reportico_session_name'])) {
            $session_name = $_REQUEST['reportico_session_name'];
            if (preg_match("/_/", $session_name)) {

                $ar = explode("_", $session_name);
                ReporticoApp::set("session_namespace", $ar[1]);
                if (ReporticoApp::get("session_namespace")) {
                    ReporticoApp::set("session_namespace_key", "reportico_" . ReporticoApp::get("session_namespace"));
                }

                // Set session to join only if it is not NS meaning its called from framework and existing session
                // should be used
                //if ($ar[0] != "NS") {
                    $session_name = $ar[1];
                //}

            }
        }
        return $session_name;
    }
444791
def namespace_attributes(ns)
      Hash[ns.map do |prefix, uri|
             if prefix==""
               ["xmlns", uri]
             else
               [["xmlns", prefix].join(":"), uri]
             end
           end]
    end
115380
private synchronized void registerNamespace(String prefix, String uri, boolean persist) throws NamespaceException, RepositoryException
   {
      if (namespaces.containsKey(prefix))
      {
         unregisterNamespace(prefix);
      }
      else if (prefixes.containsKey(uri))
      {
         unregisterNamespace(prefixes.get(uri));
      }
      if (persister != null && persist)
      {
         persister.addNamespace(prefix, uri);
      }
      final String newPrefix = new String(prefix);
      final String newUri = new String(uri);

      namespaces.put(newPrefix, newUri);
      prefixes.put(newUri, newPrefix);
   }
656902
SessionImpl internalLogin(ConversationState state, String workspaceName) throws LoginException,
      NoSuchWorkspaceException, RepositoryException
   {

      if (workspaceName == null)
      {
         workspaceName = config.getDefaultWorkspaceName();
         if (workspaceName == null)
         {
            throw new NoSuchWorkspaceException("Both workspace and default-workspace name are null! ");
         }
      }

      if (!isWorkspaceInitialized(workspaceName))
      {
         throw new NoSuchWorkspaceException("Workspace '" + workspaceName + "' not found. "
            + "Probably is not initialized. If so either Initialize it manually or turn on the RepositoryInitializer");
      }

      SessionFactory sessionFactory = repositoryContainer.getWorkspaceContainer(workspaceName).getSessionFactory();
      return sessionFactory.createSession(state);
   }
838163
function(callback){
			if(!this.id){
				return process.nextTick(function(){
					callback(new Error("Invalid session ID"));
				});
			}
			options.client.del(options.keyspace + this.id, callback);
		}
403178
def setOpenIDNamespace(self, openid_ns_uri, implicit):
        
        if isinstance(openid_ns_uri, bytes):
            openid_ns_uri = str(openid_ns_uri, encoding="utf-8")
        if openid_ns_uri not in self.allowed_openid_namespaces:
            raise InvalidOpenIDNamespace(openid_ns_uri)

        self.namespaces.addAlias(openid_ns_uri, NULL_NAMESPACE, implicit)
        self._openid_ns_uri = openid_ns_uri
573937
@Override
    public final String getNamespaceURI(String prefix)
    {
        /* First the known offenders; invalid args, 2 predefined xml namespace
         * prefixes
         */
        if (prefix == null) {
            throw new IllegalArgumentException(ErrorConsts.ERR_NULL_ARG);
        }
        if (prefix.length() > 0) {
            if (prefix.equals(XMLConstants.XML_NS_PREFIX)) {
                return XMLConstants.XML_NS_URI;
            }
            if (prefix.equals(XMLConstants.XMLNS_ATTRIBUTE)) {
                return XMLConstants.XMLNS_ATTRIBUTE_NS_URI;
            }
        }
        return doGetNamespaceURI(prefix);
    }
1161267
def _make_context(context=None):
    
    namespace = {'db': db, 'session': db.session}
    namespace.update(_iter_context())

    if context is not None:
        namespace.update(context)

    return namespace
904228
@Override
    protected void addHttpSessionIdListeners(ArrayList sessionIdListeners, String j2eeName, SessionContext sessCtx) {
        sessCtx.addHttpSessionIdListener(sessionIdListeners, j2eeName);
    }
492621
@Override
    public String getNameInNamespace() throws NamingException {
        return base == null ? NamingConstants.JAVA_NS : base.toString();
    }
337912
function(callback){
			var self = this;
			if(!this.id){
				return process.nextTick(function(){
					callback(new Error("Invalid session ID"));
				});
			}

			options.client.get(options.keyspace + self.id, function(error, resp){
				if(error)
					return callback(error);
				try{
					resp = JSON.parse(resp);
				}catch(e){
					return callback(e);
				}
				extendSession(self, resp);
				callback();
			});
		}
886897
private Session getOrCreateSession(SessionId sessionId) {
    Session session = sessions.get(sessionId);
    if (session == null) {
      session = new LocalSession(sessionId, name(), type(), null, service.serializer());
      sessions.put(session.sessionId(), session);
      service.register(session);
    }
    return session;
  }
1135984
public static Map<String, String> getNamespaces(final Session session) {
        final NamespaceRegistry registry = getNamespaceRegistry(session);
        final Map<String, String> namespaces = new HashMap<>();

        try {
            stream(registry.getPrefixes()).filter(internalPrefix.negate()).forEach(x -> {
                try {
                    namespaces.put(x, registry.getURI(x));
                } catch (final RepositoryException e) {
                    throw new RepositoryRuntimeException(e);
                }
            });
        } catch (final RepositoryException e) {
            throw new RepositoryRuntimeException(e);
        }
        return namespaces;
    }
652334
public void useNamespace(SerializerContext serializerContext, String namespace)
	{
		if (namespace != null && namespace.length() > 0)
		{
			if (serializerContext.knownNamespaces == null)
			{
				serializerContext.knownNamespaces = new HashSet<String>(8);
			}
			serializerContext.knownNamespaces.add(namespace);
		}
	}
535754
function(sessionId) {
      if (sessionId) {
        if (sessionId.length < 24) {
          throw new CError('sid length undersized').log();
        }
        if (sessionId.length > 128) {
          throw new CError('sid length exceeded').log();
        }
        this._sid = sessionId;
      }
    }
809613
protected void namespaceImpl(String prefix, String namespaceURI) {
        if (! (this.xmlNode instanceof Element)) {
            throw new RuntimeException(
                "Cannot add an attribute to non-Element underlying node: "
                + this.xmlNode);
        }
        if (prefix != null && prefix.length() > 0) {
            ((Element) xmlNode).setAttributeNS("http://www.w3.org/2000/xmlns/",
                "xmlns:" + prefix, namespaceURI);
        } else {
            ((Element) xmlNode).setAttributeNS("http://www.w3.org/2000/xmlns/",
                "xmlns", namespaceURI);
        }
    }
1350948
def shell_sqlalchemy(session: SqlalchemySession, backend: ShellBackend):
    
    namespace = {
        'session': session
    }
    namespace.update(backend.get_namespace())
    embed(user_ns=namespace, header=backend.header)