[forge-issues] [JBoss JIRA] (FORGE-1264) Furnace CDI container requires implementation coupling to provide generic typed service

George Gastaldi (JIRA) issues at jboss.org
Wed Aug 6 20:52:29 EDT 2014


     [ https://issues.jboss.org/browse/FORGE-1264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Gastaldi closed FORGE-1264.
----------------------------------

    Fix Version/s:     (was: 2.x Future)
       Resolution: Out of Date


This class no longer exists in Furnace

> 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
>      Security Level: Public(Everyone can see) 
>          Components: Furnace (Container)
>    Affects Versions: 2.0.0.Alpha13
>            Reporter: Lincoln Baxter III
>
> 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 was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the forge-issues mailing list