public void bootstrapDatasource(List datasources) throws Throwable
{
for (Iterator iterator = datasources.iterator(); iterator.hasNext();)
{
DatasourceServiceMetaData datasourceService = (DatasourceServiceMetaData)iterator.next();
DatasourceMetaData ds = datasourceService.getDatasource();
//instantiate datasource using MC
String entryName = "portal:identity=Datasource,type=" + ds.getName();
AbstractBeanMetaData dsBMD = new AbstractBeanMetaData(entryName,
ds.getClassName());
AbstractPropertyMetaData propertyBMD = new AbstractPropertyMetaData("identityContext", identityContext);
dsBMD.addProperty(propertyBMD);
propertyBMD = new AbstractPropertyMetaData("jndiBinder", getServiceJNDIBinder());
dsBMD.addProperty(propertyBMD);
//initiate parameters from <config>
for (Iterator iterator1 = datasourceService.getOptions().keySet().iterator(); iterator1.hasNext();)
{
String propertyKey = (String)iterator1.next();
String propertyValue = (String)datasourceService.getOptions().get(propertyKey);
//if (log.isDebugEnabled()) log.debug("adding parameter: " + propertyKey + " ; " + propertyValue);
propertyBMD = new AbstractPropertyMetaData(propertyKey, propertyValue);
dsBMD.addProperty(propertyBMD);
}