[
https://issues.jboss.org/browse/FORGE-1264?page=com.atlassian.jira.plugin...
]
Lincoln Baxter III updated FORGE-1264:
--------------------------------------
Fix Version/s: 2.x Future
Furnace CDI container requires implementation coupling to provide
generic typed service
---------------------------------------------------------------------------------------
Key: FORGE-1264
URL:
https://issues.jboss.org/browse/FORGE-1264
Project: Forge
Issue Type: Feature Request
Components: Furnace (Container)
Affects Versions: 2.0.0.Alpha13
Reporter: Lincoln Baxter III
Fix For: 2.x Future
ExportedInstanceLazyLoader.loadObject()
{code}
private Object loadObject() throws Exception
{
Object result = null;
for (Addon addon : registry.getAddons(ALL_STARTED))
{
if (ClassLoaders.containsClass(addon.getClassLoader(), serviceType))
{
ServiceRegistry serviceRegistry = addon.getServiceRegistry();
if (serviceRegistry.hasService(serviceType))
{
ExportedInstance<?> instance =
serviceRegistry.getExportedInstance(serviceType);
if (instance != null)
{
if (instance instanceof ExportedInstanceImpl)
// FIXME remove the need for this implementation coupling
result = ((ExportedInstanceImpl<?>) instance).get(new
LocalServiceInjectionPoint(
injectionPoint,
serviceType));
else
result = instance.get();
if (result != null)
break;
}
}
}
}
if (result == null)
{
throw new IllegalStateException("Remote service [" +
serviceType.getName() + "] is not registered.");
}
return result;
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira