if (dbSourceName != null)
{
DataSource ds = (DataSource)new InitialContext().lookup(dbSourceName);
if (ds != null)
this.connFactory =
new MySQLConnectionFactory(ds, containerName, multiDb, valueStorageProvider, maxBufferSize,
swapDirectory, swapCleaner);
else
throw new RepositoryException("Datasource '" + dbSourceName + "' is not bound in this context.");
}
else
this.connFactory =
new MySQLConnectionFactory(dbDriver, dbUrl, dbUserName, dbPassword, containerName, multiDb,
valueStorageProvider, maxBufferSize, swapDirectory, swapCleaner);
sqlPath = "/conf/storage/jcr-" + (multiDb ? "m" : "s") + "jdbc.mysql.sql";
dbInitilizer = defaultDBInitializer(sqlPath);
}
else if (dbDialect == DBConstants.DB_DIALECT_MYSQL_UTF8)
{
// [PN] 13.07.08
if (dbSourceName != null)
{
DataSource ds = (DataSource)new InitialContext().lookup(dbSourceName);
if (ds != null)
this.connFactory =
new MySQLConnectionFactory(ds, containerName, multiDb, valueStorageProvider, maxBufferSize,
swapDirectory, swapCleaner);
else
throw new RepositoryException("Datasource '" + dbSourceName + "' is not bound in this context.");
}
else
this.connFactory =
new MySQLConnectionFactory(dbDriver, dbUrl, dbUserName, dbPassword, containerName, multiDb,
valueStorageProvider, maxBufferSize, swapDirectory, swapCleaner);
sqlPath = "/conf/storage/jcr-" + (multiDb ? "m" : "s") + "jdbc.mysql-utf8.sql";
dbInitilizer = defaultDBInitializer(sqlPath);
}