Load all users from the database and their configured services. Registers each service.

@param session
@throws BimserverDatabaseException
@throws BimserverLockConflictException
340858
public void activateServices() throws BimserverDatabaseException, BimserverLockConflictException {
		try (DatabaseSession session = bimDatabase.createSession()) {
			IfcModelInterface allOfType = session.getAllOfType(StorePackage.eINSTANCE.getUser(), OldQuery.getDefault());
			for (User user : allOfType.getAll(User.class)) {
				updateUserSettings(session, user);
				UserSettings userSettings = user.getUserSettings();
	
				for (InternalServicePluginConfiguration internalServicePluginConfiguration : userSettings.getServices()) {
					activateService(user.getOid(), internalServicePluginConfiguration);
				}
			}
		}
	}
661231
def lock(self, session):
        
        if self.busy:
            raise ConnectionBusyError(self)
        with self._lock:
            self.used_by = weakref.ref(session)
        LOGGER.debug('Connection %s locked', self.id)
948681
public void addSession(AbstractIoSession session) {
        sessions.add(session);
        CloseFuture closeFuture = session.getCloseFuture();
        
        // isn't service reponsability to remove the session nicely ?
        closeFuture.addListener(sessionCloseListener);
    }
448556
protected static function load()
    {
        if (!static::isOn()) {
            return false;
        } elseif (!array_has($_SESSION, static::$register_name)) {
            $_SESSION[static::$register_name] = [];
        }

        static::$register = $_SESSION[static::$register_name];

        return true;
    }
1315591
public void setSessions(java.util.Collection<Session> sessions) {
        if (sessions == null) {
            this.sessions = null;
            return;
        }

        this.sessions = new com.amazonaws.internal.SdkInternalList<Session>(sessions);
    }
179793
def start_session(user, collection)
      connect
      session = Session.new user, collection
      self << session
      session
    end
340095
public void initialize()
	{
		super.initialize();
		services = new HashMap<Class, BCSSServiceProvider>();
		serializable = 0;
		proxy = null;
		bcsListeners = new ArrayList<BeanContextServicesListener>();
	}
1021154
def bind(self, database):
        
        self._database = database

        for _ in xrange(self.size):
            session = self._new_session()
            session.create()
            self.put(session)
374555
public static void load(Connection connection) throws SQLException {
        Statement st = connection.createStatement();
        for (Function function : getBuiltInsFunctions()) {
            try {
                H2GISFunctions.registerFunction(st, function, "");
            } catch (SQLException ex) {
                // Catch to register other functions
                LOGGER.error(ex.getLocalizedMessage(), ex);
            }
        }
    }
457347
protected void initialize() {
        super.initialize();
        _serviceProviders = Collections.synchronizedMap(new HashMap<Class, ServiceProvider>());
        _bcsListeners = Collections.synchronizedList(new ArrayList<BeanContextServicesListener>());
    }
222197
def _load(self):
        """"""

        self.session_id = self._session_object.get_session_id()

        # protection against session_id tampering
        if self.session_id and not self._valid_session_id(self.session_id):
            self.session_id = None

        if self.session_id:
            d = self.store[self.session_id]
            if isinstance(d, dict) and d:
                self.update(d)

        if not self.session_id:
            self.session_id = self._session_object.generate_session_id()

        if not self._data:
            if self._initializer and isinstance(self._initializer, dict):
                self.update(deepcopy(self._initializer))

        self._session_object.set_session_id(self.session_id)
1059056
@Override
	public final void sessionOpened(final IoSession session) throws Exception {
		session.write(this.welcome);
		session.write(ENDLINE);
		session.write("> ");
		super.sessionOpened(session);
	}
290082
private static void registerServer(Server server, Database db) {

        if (!serverMap.containsKey(server)) {
            serverMap.put(server, new HashSet());
        }

        HashSet databases = (HashSet) serverMap.get(server);

        databases.add(db);
    }
381210
public void reloadUsers(int contextId) {
		List<User> users = new ArrayList<User>(usersExtension.getContextUserAuthManager(contextId).getUsers());
		tableModel = new UsersSelectTableModel(users);
		this.setModel(tableModel);
	}
146025
public function loadConfiguration(): void
	{
		parent::loadConfiguration();

		$builder = $this->getContainerBuilder();

		$builder->addDefinition($this->prefix('application'))
			->setFactory(MiddlewareApplication::class)
			->setArguments([new Statement('@' . $this->prefix('chain') . '::create')]);
	}
1329972
protected function lockToUser($session, $request)
    {
        $session->set(self::LOCKED_FIELD, [
            'ip' => $request->getClientIp(),
            'agent' => md5($request->server('HTTP_USER_AGENT'))
        ]);
    }
1078793
protected function loadQuery()
    {
        if( !isset( $this->session[ $this->saveID ] ) ) {
            return;
        }
        $saved        = $this->session[ $this->saveID ];
        $this->inputs = array_merge( $saved[ 'inputs' ], $this->inputs );
        $this->perPage = $saved[ 'perPage' ];
        if( $currPage=$this->getKey($this->pager) ) {
            $this->currPage = $currPage;
        } else{
            $this->currPage = $saved['currPage'];
        }
    }