class Context {

    private void init()
    {
        if(eventService == null)
        {
            eventService = EventServiceFactory.getInstance().getEventService();
        }
        if(dbConnection == null)
        {
            // Obtain a non-auto-committing connection
            dbConnection = new DSpace().getSingletonService(DBConnection.class);
            if(dbConnection == null)
            {
                //It appears there is a problem with the database, run the Schema validator
                DatabaseSchemaValidator schemaValidator = new DSpace().getSingletonService(DatabaseSchemaValidator.class);

                String validationError = schemaValidator == null ? "null" : schemaValidator.getDatabaseSchemaValidationError();
                String message = "The schema validator returned: " +
                        validationError;

                log.fatal("Cannot obtain the bean which provides a database connection. " +
                        "Check previous entries in the dspace.log to find why the db failed to initialize. " + message);

                //Fail fast
                throw new DatabaseSchemaValidationException(message);
            }
        }

        currentUser = null;
        currentLocale = I18nUtil.DEFAULTLOCALE;
        extraLogInfo = "";
        ignoreAuth = false;

        specialGroups = new ArrayList<>();

        authStateChangeHistory = new Stack<Boolean>();
        authStateClassCallHistory = new Stack<String>();
        setMode(this.mode);
    }

    protected  Context(EventService eventService, DBConnection dbConnection);
    public  Context();
    public  Context(Mode mode);

}