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