if (retrieval == null)
{
retrieval = new MemoryMetaDataLoader(scopeKey);
mmdr.addMetaDataRetrieval(retrieval);
}
MutableMetaData mmd = (MutableMetaData)retrieval;
// deploy against this kernel
Kernel kernel = underlyingKernel;
// Get the parent scope - if exists
ScopeKey parent = scopeKey.getParent();
if (parent != null)
{
MetaDataRetrieval pretrieval = mmdr.getMetaDataRetrieval(parent);
MetaDataItem<Kernel> item = pretrieval.retrieveMetaData(Kernel.class);
if (item != null)
kernel = item.getValue();
}
// Create a scoped kernel Kernel
Kernel scopedKernel = kernel;// TODO new ScopedKernel(kernel);
mmd.addMetaData(scopedKernel, Kernel.class);
}