<p>bootstrap.</p>

@param application a {@link ameba.core.Application} object.
@throws java.lang.Exception if any.
424361
public static synchronized void bootstrap(Application application) throws Exception {
        if (Ameba.container != null) {
            throw new AmebaException(Messages.get("info.service.start"));
        }

        app = application;
        container = Container.create(app);

        // run
        logger.info(Messages.get("info.service.start"));
        container.start();
    }
9792
protected function resolveApplicationBootstrappers($app)
    {
        $app->make('Illuminate\Foundation\Bootstrap\HandleExceptions')->bootstrap($app);
        $app->make('Illuminate\Foundation\Bootstrap\RegisterFacades')->bootstrap($app);
        $app->make('Illuminate\Foundation\Bootstrap\SetRequestForConsole')->bootstrap($app);
        $app->make('Illuminate\Foundation\Bootstrap\RegisterProviders')->bootstrap($app);

        $this->getEnvironmentSetUp($app);

        $app->make('Illuminate\Foundation\Bootstrap\BootProviders')->bootstrap($app);

        foreach ($this->getPackageBootstrappers($app) as $bootstrap) {
            $app->make($bootstrap)->bootstrap($app);
        }

        $app->make('Illuminate\Contracts\Console\Kernel')->bootstrap();

        $app['router']->getRoutes()->refreshNameLookups();

        $app->resolving('url', function ($url, $app) {
            $app['router']->getRoutes()->refreshNameLookups();
        });
    }
1093517
public static void main(String... args) throws Exception {
        if (System.getProperty("boot.module.loader") == null) {
            System.setProperty("boot.module.loader", "org.wildfly.swarm.bootstrap.modules.BootModuleLoader");
        }
        Module bootstrap = Module.getBootModuleLoader().loadModule(ModuleIdentifier.create("swarm.application"));

        ServiceLoader<ContainerFactory> factory = bootstrap.loadService(ContainerFactory.class);
        Iterator<ContainerFactory> factoryIter = factory.iterator();

        if (!factoryIter.hasNext()) {
            simpleMain(args);
        } else {
            factoryMain(factoryIter.next(), args);
        }
    }
466338
public function bootstrap($app)
    {
        if ($app instanceof WebApplication) {
            $this->addUrlManagerRules($app);
            $this->setPodiumLogTarget($app);
        } elseif ($app instanceof ConsoleApplication) {
            $this->controllerNamespace = 'bizley\podium\console';
        }
    }
734331
public void bootstrap() throws ConfigurationException {

    XMLConfigurator configurator = new XMLConfigurator();

    for (String config : configs) {
      log.debug("Loading XMLTooling configuration " + config);
      configurator.load(Configuration.class.getResourceAsStream(config));
    }
  }
1138236
@Override
	public Response createApplication( Application app ) {

		this.logger.fine( "Request: create application " + app + "." );
		Response result;
		try {
			String tplName = app.getTemplate() == null ? null : app.getTemplate().getName();
			String tplQualifier = app.getTemplate() == null ? null : app.getTemplate().getVersion();
			String appName = app.getDisplayName() != null ? app.getDisplayName() : app.getName();
			ManagedApplication ma = this.manager.applicationMngr().createApplication( appName, app.getDescription(), tplName, tplQualifier );
			result = Response.ok().entity( ma.getApplication()).build();

		} catch( InvalidApplicationException e ) {
			result = handleError(
					Status.NOT_FOUND,
					new RestError( REST_MNGMT_INVALID_TPL, e, application( app )),
					lang( this.manager )).build();

		} catch( AlreadyExistingException e ) {
			result = handleError(
					Status.FORBIDDEN,
					new RestError( REST_MNGMT_CONFLICT, e, application( app )),
					lang( this.manager )).build();

		} catch( IOException e ) {
			result = handleError(
					Status.UNAUTHORIZED,
					new RestError( REST_SAVE_ERROR, e, application( app )),
					lang( this.manager )).build();
		}

		return result;
	}
779329
void initialise(@NonNull final Application application, CallbackAdapter adapter, Callback<ComapiClient> callback) {
        this.adapter = adapter;
        adapter.adapt(super.initialise(application, this, adapter), callback);
    }
462052
public function bootstrap(Application $app)
    {
        $this->app = $app;
        define('DEBUG', (ENVIRON == 'local' || ENVIRON == 'test'));
        if (DEBUG) {
            error_reporting(E_ALL ^ E_NOTICE);
            ini_set('display_errors', 'On');
        } else {
            error_reporting(0);
            ini_set('display_errors', 'Off');
        }
        set_error_handler([$this, 'handleError']);
        set_exception_handler([$this, 'handleException']);
        register_shutdown_function([$this, 'handleShutdown']);
    }
265036
public function bootstrap()
    {

        // register the default autoloader
        require SERVER_AUTOLOADER;

        // synchronize the application instance and register the class loaders
        $application = $this->application;
        $application->registerClassLoaders();

        // register the applications annotation registries
        $application->registerAnnotationRegistries();

        // add the application instance to the environment
        Environment::singleton()->setAttribute(EnvironmentKeys::APPLICATION, $application);

        // create s simulated request/session ID whereas session equals request ID
        Environment::singleton()->setAttribute(EnvironmentKeys::SESSION_ID, $sessionId = SessionUtils::generateRandomString());
        Environment::singleton()->setAttribute(EnvironmentKeys::REQUEST_ID, $sessionId);

        // try to load the profile logger
        if ($this->profileLogger = $application->getInitialContext()->getLogger(\AppserverIo\Logger\LoggerUtils::PROFILE)) {
            $this->profileLogger->appendThreadContext(sprintf('queue-worker-%s', $this->priorityKey));
        }
    }
84157
public function bootstrap(Application $app)
    {
        /** @var Container $container */
        $container = $app->getContainer();

        $container->share('app', $app);
        $container->alias('app', Application::class);
        $container->alias('app', ApplicationInterface::class);

        $container->share('container', $container);

        $container->share('kernel.http', function () use ($container) {
            return $container->get(Kernel::class);
        });
        $container->alias('kernel.http', KernelInterface::class);

        $container->alias('router', Router::class);
        $container->alias('dispatcher', Dispatcher::class);
    }
1233109
public function bootstrap(Application $app)
    {
        $app->make('orchestra.memory')->extend('user', function ($app, $name) {
            return new UserProvider(
                new UserRepository($name, [], $app)
            );
        });
    }
450772
public void runAfterApplicationCreateBootstrap(
      Instrumentation instrumentation, String[] bootstrapClasses) {
    if (!isWithExtension) {
      SelendroidLogger.error("Cannot run bootstrap. Must load an extension first.");
      return;
    }

    for (String bootstrapClassName : bootstrapClasses) {
      try {
        SelendroidLogger.info("Running afterApplicationCreate bootstrap: " + bootstrapClassName);
        loadBootstrap(bootstrapClassName).runAfterApplicationCreate(instrumentation);
        SelendroidLogger.info("\"Running afterApplicationCreate bootstrap: " + bootstrapClassName);
      } catch (Exception e) {
        throw new SelendroidException(
            "Cannot run bootstrap " + bootstrapClassName, e);
      }
    }
  }
975253
public function bootstrap(): void
    {
        if (! $this->app->hasBeenBootstrapped()) {
            $this->app->bootstrapWith($this->bootstrappers());
        }
    }
513392
public function bootstrap()
    {

        // setup autoloader
        require SERVER_AUTOLOADER;

        // enable garbage collection
        gc_enable();

        // synchronize the application instance and register the class loaders
        $application = $this->getApplication();
        $application->registerClassLoaders();

        // register the applications annotation registries
        $application->registerAnnotationRegistries();

        // try to load the profile logger
        if ($this->profileLogger = $this->getApplication()->getInitialContext()->getLogger(LoggerUtils::PROFILE)) {
            $this->profileLogger->appendThreadContext('startup-bean-task-garbage-collector');
        }
    }
1047552
protected function bootstrap($app): void
    {
        $app->bootstrapWith([
            \Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables::class,
            \CrCms\Microservice\Bootstrap\LoadConfiguration::class,
            \CrCms\Microservice\Bootstrap\HandleExceptions::class,
            \CrCms\Microservice\Bootstrap\RegisterFacades::class,
            //\Illuminate\Foundation\Bootstrap\SetRequestForConsole::class,
            \Illuminate\Foundation\Bootstrap\RegisterProviders::class,
            \Illuminate\Foundation\Bootstrap\BootProviders::class,
        ]);
    }
265506
protected function bootApplication()
    {
        $this->fireAppCallbacks($this->bootingCallbacks);

        $this->booted = true;

        $this->fireAppCallbacks($this->bootedCallbacks);
    }
1125151
private function loadApplicationConfig()
    {
        // load the config
        try{
            $this->applicationConfig = $this->config()->yaml($this->applicationAbsolutePath . 'App/Config/App.yaml');
        }catch (\Exception $e){
            throw new BootstrapException('Unable to read app config file: '.$this->applicationAbsolutePath . 'App/Config/App.yaml');
        }

    }