/** * INTERNAL: Allow each descriptor to initialize any dependencies on this session. This is done in * two passes to allow the inheritance to be resolved first. Normally the descriptors are added * before login, then initialized on login. */ public void initializeDescriptors() { // ClientSession initializes sequencing during construction, // however DatabaseSession and ServerSession normally call initializeSequencing() // in initializeDescriptors method. // Because initializeDescriptors() is not called for a session-member of a SessionBroker, // initializeSequencing() for the sessions should be called here. if (!isClientSessionBroker()) { for (Iterator enumtr = getSessionsByName().values().iterator(); enumtr.hasNext(); ) { DatabaseSessionImpl databaseSession = (DatabaseSessionImpl) enumtr.next(); databaseSession.initializeSequencing(); } if (hasExternalTransactionController()) { getExternalTransactionController().initializeSequencingListeners(); } } super.initializeDescriptors(); // Must reset project options to session broker project, as initialization occurs // with local projects. for (Iterator enumtr = getSessionsByName().values().iterator(); enumtr.hasNext(); ) { DatabaseSessionImpl databaseSession = (DatabaseSessionImpl) enumtr.next(); if (databaseSession.getProject().hasGenericHistorySupport()) { getProject().setHasGenericHistorySupport(true); } if (databaseSession.getProject().hasIsolatedClasses()) { getProject().setHasIsolatedClasses(true); } if (databaseSession.getProject().hasNonIsolatedUOWClasses()) { getProject().setHasNonIsolatedUOWClasses(true); } getProject() .getDefaultReadOnlyClasses() .addAll(databaseSession.getProject().getDefaultReadOnlyClasses()); } // ServerSessionBroker doesn't need sequencing. // Sequencing should be obtained either from the ClientSessionBroker or directly // from the ClientSession. if (isServerSessionBroker()) { sequencing = null; } }