// User has requested internal database connection pooling so check the registered plugins
try
{
// Create the DataSource to be used
DataNucleusDataSourceFactory dataSourceFactory =
(DataNucleusDataSourceFactory)storeMgr.getNucleusContext().getPluginManager().createExecutableExtension(
"org.datanucleus.store.rdbms.datasource", "name", poolingType, "class-name", null, null);
if (dataSourceFactory == null)
{
// User has specified a pool plugin that has not registered
throw new NucleusUserException(LOCALISER_RDBMS.msg("047003", poolingType)).setFatal();
}
// Create the DataNucleusDataSourceFactory
dataSource[0] = dataSourceFactory.makePooledDataSource(storeMgr);
if (NucleusLogger.CONNECTION.isDebugEnabled())
{
NucleusLogger.CONNECTION.debug(LOCALISER_RDBMS.msg("047008", resourceType, poolingType));
}
}