@Test public void createServiceWithResourceAttribute() { final ServiceInfo serviceInfo = new ServiceInfo(); serviceInfo.id = "the-id"; serviceInfo.className = TheService.class.getName(); serviceInfo.properties = new Properties(); serviceInfo.properties.setProperty("dataSource", "@ds"); final TheService instance = TheService.class.cast(ServiceInfos.resolve(asList(serviceInfo), serviceInfo.id)); assertNotNull(instance.dataSource); }
public static Object resolve(final Collection<ServiceInfo> services, final String id) { if (id == null) { return null; } try { return build(services, find(services, id)); } catch (final OpenEJBException e) { throw new OpenEJBRuntimeException(e); } }
ServiceInfos { public static Object resolve(final Collection<ServiceInfo> services, final String id) { if (id == null) { return null; } try { return build(services, find(services, id)); } catch (final OpenEJBException e) { throw new OpenEJBRuntimeException(e); } } }
ServiceInfos { public static Object resolve(final Collection<ServiceInfo> services, final String id) { if (id == null) { return null; } try { return build(services, find(services, id)); } catch (final OpenEJBException e) { throw new OpenEJBRuntimeException(e); } } private  ServiceInfos(); }
ServiceInfos { public static Object resolve(final Collection<ServiceInfo> services, final String id) { if (id == null) { return null; } try { return build(services, find(services, id)); } catch (final OpenEJBException e) { throw new OpenEJBRuntimeException(e); } } private  ServiceInfos(); static Object resolve(final Collection<ServiceInfo> services, final String id); static ServiceInfo find(final Collection<ServiceInfo> services, final String id); static ServiceInfo findByClass(final Collection<ServiceInfo> services, final String clazz); static List<Object> resolve(final Collection<ServiceInfo> serviceInfos, final String[] ids); static List<Object> resolve(final Collection<ServiceInfo> serviceInfos, final String[] ids, final Factory factory); static Properties serviceProperties(final Collection<ServiceInfo> serviceInfos, final String id); static Object build(final Collection<ServiceInfo> services, final ServiceInfo info, final ObjectRecipe serviceRecipe); static void setProperties(final Collection<ServiceInfo> services, final ServiceInfo info, final ObjectRecipe serviceRecipe); }
ServiceInfos { public static Object resolve(final Collection<ServiceInfo> services, final String id) { if (id == null) { return null; } try { return build(services, find(services, id)); } catch (final OpenEJBException e) { throw new OpenEJBRuntimeException(e); } } private  ServiceInfos(); static Object resolve(final Collection<ServiceInfo> services, final String id); static ServiceInfo find(final Collection<ServiceInfo> services, final String id); static ServiceInfo findByClass(final Collection<ServiceInfo> services, final String clazz); static List<Object> resolve(final Collection<ServiceInfo> serviceInfos, final String[] ids); static List<Object> resolve(final Collection<ServiceInfo> serviceInfos, final String[] ids, final Factory factory); static Properties serviceProperties(final Collection<ServiceInfo> serviceInfos, final String id); static Object build(final Collection<ServiceInfo> services, final ServiceInfo info, final ObjectRecipe serviceRecipe); static void setProperties(final Collection<ServiceInfo> services, final ServiceInfo info, final ObjectRecipe serviceRecipe);  }