{
try
{
ResourceLoader resourceLoader = new AddonResourceLoader(addon);
ModularURLScanner scanner = new ModularURLScanner(resourceLoader, "META-INF/beans.xml");
ModuleScanResult scanResult = scanner.scan();
Callable<Object> shutdownCallback = null;
if (scanResult.getDiscoveredResourceUrls().isEmpty())
{
/*
* This is an import-only addon and does not require weld, nor provide remote services.
*/
addon.setServiceRegistry(new NullServiceRegistry());