}
// Create the metadata for the bean to install
AbstractBeanMetaData bean = new AbstractBeanMetaData(name, service.getClass().getName());
bean.setConstructor(new AlreadyInstantiated(service));
MCDependencyPolicy policy = (MCDependencyPolicy) dependencies;
bean.setDepends(policy.getDependencies());
bean.setDemands(policy.getDemands());
bean.setSupplies(policy.getSupplies());
log.info("installing bean: " + name);
log.info(" with dependencies:");
for (Object obj : policy.getDependencies())
{
Object msgObject = obj;
if (obj instanceof AbstractDemandMetaData)
{
msgObject = ((AbstractDemandMetaData)obj).getDemand();
}
log.info("\t" + msgObject);
}
log.info(" and demands:");
for(DemandMetaData dmd : policy.getDemands())
{
log.info("\t" + dmd.getDemand() + "; Required: " + dmd.getWhenRequired().getStateString());
}
log.info(" and supplies:");
for(SupplyMetaData smd : policy.getSupplies())
{
log.info("\t" + smd.getSupply());
}
if(service instanceof EJBContainer)