446425 Oracle Sql error on JettySessions table when this table do not exist already

This commit is contained in:
Jan Bartel 2014-10-10 17:36:36 +11:00
parent dd864f9799
commit e292b572f1
1 changed files with 5 additions and 1 deletions

View File

@ -297,7 +297,11 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager
if (_dbAdaptor == null)
throw new IllegalStateException ("No DBAdaptor");
String longType = _dbAdaptor.getLongType();
return "alter table "+getTableName()+" add "+getMaxIntervalColumn()+" "+longType+" not null default "+MAX_INTERVAL_NOT_SET;
String stem = "alter table "+getTableName()+" add "+getMaxIntervalColumn()+" "+longType;
if (_dbAdaptor.getDBName().contains("oracle"))
return stem + " default "+ MAX_INTERVAL_NOT_SET + " not null";
else
return stem +" not null default "+ MAX_INTERVAL_NOT_SET;
}
private void checkNotNull(String s)