@Override public void onAfterInitialized(final Application application) { notify(new INotifier<IApplicationListener>() { @Override public void notify(IApplicationListener listener) { listener.onAfterInitialized(application); } }); }
@Override public void onBeforeDestroyed(final Application application) { reversedNotifyIgnoringExceptions(new INotifier<IApplicationListener>() { @Override public void notify(IApplicationListener listener) { listener.onBeforeDestroyed(application); } }); }
application.getApplicationListeners().add(new IApplicationListener() { @Override public void onAfterInitialized(Application application) {
/** * Initialize the application */ public final void initApplication() { if (name == null) { throw new IllegalStateException("setName must be called before initApplication"); } internalInit(); initInitializers(); init(); applicationListeners.onAfterInitialized(this); validateInit(); }
/** * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL IT. */ public void internalDestroy() { applicationListeners.onBeforeDestroyed(this); // destroy detach listener final IDetachListener detachListener = getFrameworkSettings().getDetachListener(); if (detachListener != null) { detachListener.onDestroyListener(); } // Clear caches of Class keys so the classloader can be garbage // collected (WICKET-625) PropertyResolver.destroy(this); MarkupFactory markupFactory = getMarkupSettings().getMarkupFactory(); if (markupFactory.hasMarkupCache()) { markupFactory.getMarkupCache().shutdown(); } onDestroy(); destroyInitializers(); internalGetPageManager().destroy(); getSessionStore().destroy(); applicationKeyToApplication.remove(getApplicationKey()); }
@Override public void onOpen(Session session, EndpointConfig endpointConfig) { String appName = getApplicationName(session); WebApplication app = (WebApplication) WebApplication.get(appName); app.getApplicationListeners().add(new ApplicationListener(applicationDestroyed)); try { ThreadContext.setApplication(app); javaxWebSocketProcessor = new JavaxWebSocketProcessor(session, app, endpointConfig); } finally { ThreadContext.detach(); } }
/** * Initialize the application */ public final void initApplication() { if (name == null) { throw new IllegalStateException("setName must be called before initApplication"); } internalInit(); initInitializers(); init(); applicationListeners.onAfterInitialized(this); validateInit(); }
/** * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL IT. */ public void internalDestroy() { applicationListeners.onBeforeDestroyed(this); // destroy detach listener final IDetachListener detachListener = getFrameworkSettings().getDetachListener(); if (detachListener != null) { detachListener.onDestroyListener(); } // Clear caches of Class keys so the classloader can be garbage // collected (WICKET-625) PropertyResolver.destroy(this); MarkupFactory markupFactory = getMarkupSettings().getMarkupFactory(); if (markupFactory.hasMarkupCache()) { markupFactory.getMarkupCache().shutdown(); } onDestroy(); destroyInitializers(); internalGetPageManager().destroy(); getSessionStore().destroy(); applicationKeyToApplication.remove(getApplicationKey()); }
@Override public void onOpen(Session session, EndpointConfig endpointConfig) { String appName = getApplicationName(session); WebApplication app = (WebApplication) WebApplication.get(appName); app.getApplicationListeners().add(new ApplicationListener(applicationDestroyed)); try { ThreadContext.setApplication(app); javaxWebSocketProcessor = new JavaxWebSocketProcessor(session, app, endpointConfig); } finally { ThreadContext.detach(); } }
@Override public void onBeforeDestroyed(final Application application) { reversedNotifyIgnoringExceptions(new INotifier<IApplicationListener>() { @Override public void notify(IApplicationListener listener) { listener.onBeforeDestroyed(application); } }); }
@Override public void onAfterInitialized(final Application application) { notify(new INotifier<IApplicationListener>() { @Override public void notify(IApplicationListener listener) { listener.onAfterInitialized(application); } }); }
application.getApplicationListeners().add(new CdiShutdownCleaner(params.isInjectApplication()));
getApplicationListeners().add(new EmbeddOrientDbApplicationListener(OrienteerWebApplication.class.getResource("db.config.xml")) getMarkupSettings().setStripWicketTags(true); getResourceSettings().setThrowExceptionOnMissingResource(false); getApplicationListeners().add(new ModuledDataInstallator()); getApplicationListeners().add(new IApplicationListener() {
@Override public void init() { super.init(); getApplicationListeners().add(new EmbeddOrientDbApplicationListener(OrientDbTestWebApplication.class.getResource("db.config.xml")) { @Override public void onAfterServerStartupAndActivation(OrientDbWebApplication app) throws Exception { IOrientDbSettings settings = app.getOrientDbSettings(); ODatabaseDocumentTx db = new ODatabaseDocumentTx(DB_MEMORY_URL); if(!db.exists()) db = db.create(); if(db.isClosed()) db.open(settings.getAdminUserName(), settings.getAdminPassword()); db.getMetadata().load(); db.close(); } }); getRequestCycleListeners().add(new LazyAuthorizationRequestCycleListener()); getOrientDbSettings().setDBUrl(DB_MEMORY_URL); getOrientDbSettings().setGuestUserName("reader"); getOrientDbSettings().setGuestPassword("reader"); getOrientDbSettings().setAdminUserName("admin"); getOrientDbSettings().setAdminPassword("admin"); getOrientDbSettings().getORecordHooks().add(TestHook.class); getApplicationListeners().add(new TestDataInstallator()); mountOrientDbRestApi(); }
application.getApplicationListeners().add(new CdiShutdownCleaner());
application.getApplicationListeners().add(new CdiShutdownCleaner());
getRequestCycleListeners().add(new OrientDefaultExceptionsHandlingListener()); getSecuritySettings().setAuthorizationStrategy(new WicketOrientDbAuthorizationStrategy(this)); getApplicationListeners().add(new IApplicationListener() {
application.getApplicationListeners().add( new CdiShutdownCleaner(beanManager, isInjectApplication()));
getRequestCycleListeners().add(new OrientDefaultExceptionsHandlingListener()); getSecuritySettings().setAuthorizationStrategy(new WicketOrientDbAuthorizationStrategy(this)); getApplicationListeners().add(new IApplicationListener() {