* Wrapped by the getSession() call, therefore, config can't be null at this
* point.
*/
protected AbstractSession buildDatabaseSessionConfig(DatabaseSessionConfig databaseSessionConfig) {
// Create a new database session (null means use login from deployment xml if there is one)
DatabaseSessionImpl databaseSession = createSession(databaseSessionConfig, null);
// Login - may overwrite the previous login (expected behavior)
Login login = buildLogin(databaseSessionConfig.getLoginConfig());
if (login != null) {
databaseSession.setLogin(login);
}
// Common processing since ServerSessions inherit from DatabaseSession
processDatabaseSessionConfig(databaseSessionConfig, databaseSession);