Class AppServerStartup

  • All Implemented Interfaces:
    com.sun.enterprise.module.bootstrap.ModuleStartup, org.glassfish.hk2.api.PostConstruct

    @Service
    @Rank(50)
    public class AppServerStartup
    extends Object
    implements org.glassfish.hk2.api.PostConstruct, com.sun.enterprise.module.bootstrap.ModuleStartup
    Main class for Glassfish startup This class spawns a non-daemon Thread when the start() is called. Having a non-daemon thread allows us to control lifecycle of server JVM. The thead is stopped when stop() is called.
    Author:
    Jerome Dochez, [email protected]
    • Constructor Detail

      • AppServerStartup

        public AppServerStartup()
    • Method Detail

      • setStartupContext

        @Inject
        public void setStartupContext​(com.sun.enterprise.module.bootstrap.StartupContext context)
        Specified by:
        setStartupContext in interface com.sun.enterprise.module.bootstrap.ModuleStartup
      • postConstruct

        public void postConstruct()
        Specified by:
        postConstruct in interface org.glassfish.hk2.api.PostConstruct
      • start

        public void start()
        Specified by:
        start in interface com.sun.enterprise.module.bootstrap.ModuleStartup
      • run

        public boolean run()
        Returns:
        True is startup succeeded, false if an error occurred preventing the server from starting
      • printModuleStatus

        public static void printModuleStatus​(com.sun.enterprise.module.ModulesRegistry registry,
                                             Level level)
      • stop

        public void stop()
        Specified by:
        stop in interface com.sun.enterprise.module.bootstrap.ModuleStartup