Atmosphere's Startup Hook: Executing Task after deploy - Atmosphere/atmosphere Wiki

Sometimes an application needs to execute some task when Atmosphere is deployed and ready to serve request. To achieve such task with Atmosphere, just do:

  AtmosphereResource.getAtmosphereConfig().startupHook(new ApplicationConfig.ShutdownHook() {
       public void startUp() {
            ...
       }  
  });