@Override public Object createServiceInstance(Class<? extends RequestContext> requestContext) { Class<? extends ServiceLocator> locatorType = getTop().resolveServiceLocator(requestContext); ServiceLocator locator = getTop().createServiceLocator(locatorType); Class<?> serviceClass = getTop().resolveServiceClass(requestContext); return locator.getInstance(serviceClass); }
@Override public Class<? extends ServiceLocator> resolveServiceLocator( Class<? extends RequestContext> requestContext) { Class<? extends ServiceLocator> locatorType; Service l = requestContext.getAnnotation(Service.class); ServiceName ln = requestContext.getAnnotation(ServiceName.class); if (l != null && !ServiceLocator.class.equals(l.locator())) { locatorType = l.locator(); } else if (ln != null && ln.locator().length() > 0) { try { locatorType = Class.forName(ln.locator(), false, getTop().getDomainClassLoader()).asSubclass( ServiceLocator.class); } catch (ClassNotFoundException e) { return die(e, "Could not find the locator type specified in the @%s annotation %s", ServiceName.class.getCanonicalName(), ln.value()); } } else { locatorType = null; } return locatorType; }
@Override public Class<? extends Locator<?, ?>> resolveLocator(Class<?> domainType) { Class<?> proxyType = getTop().resolveClientType(domainType, BaseProxy.class, false); if (proxyType == null) { return null; Class<? extends Locator<?, ?>> found = (Class<? extends Locator<?, ?>>) Class.forName(ln.locator(), false, getTop().getDomainClassLoader()).asSubclass(Locator.class); locatorType = found; } catch (ClassNotFoundException e) {
@Override public Object createServiceInstance(Class<? extends RequestContext> requestContext) { Class<? extends ServiceLocator> locatorType = getTop().resolveServiceLocator(requestContext); ServiceLocator locator = getTop().createServiceLocator(locatorType); Class<?> serviceClass = getTop().resolveServiceClass(requestContext); return locator.getInstance(serviceClass); }
@Override public Object createServiceInstance(Class<? extends RequestContext> requestContext) { Class<? extends ServiceLocator> locatorType = getTop().resolveServiceLocator(requestContext); ServiceLocator locator = getTop().createServiceLocator(locatorType); Class<?> serviceClass = getTop().resolveServiceClass(requestContext); return locator.getInstance(serviceClass); }
@Override public Object createServiceInstance(Class<? extends RequestContext> requestContext) { Class<? extends ServiceLocator> locatorType = getTop().resolveServiceLocator(requestContext); ServiceLocator locator = getTop().createServiceLocator(locatorType); Class<?> serviceClass = getTop().resolveServiceClass(requestContext); return locator.getInstance(serviceClass); }
@Override public Class<? extends ServiceLocator> resolveServiceLocator( Class<? extends RequestContext> requestContext) { Class<? extends ServiceLocator> locatorType; Service l = requestContext.getAnnotation(Service.class); ServiceName ln = requestContext.getAnnotation(ServiceName.class); if (l != null && !ServiceLocator.class.equals(l.locator())) { locatorType = l.locator(); } else if (ln != null && ln.locator().length() > 0) { try { locatorType = Class.forName(ln.locator(), false, getTop().getDomainClassLoader()).asSubclass( ServiceLocator.class); } catch (ClassNotFoundException e) { return die(e, "Could not find the locator type specified in the @%s annotation %s", ServiceName.class.getCanonicalName(), ln.value()); } } else { locatorType = null; } return locatorType; }
@Override public Class<? extends ServiceLocator> resolveServiceLocator( Class<? extends RequestContext> requestContext) { Class<? extends ServiceLocator> locatorType; Service l = requestContext.getAnnotation(Service.class); ServiceName ln = requestContext.getAnnotation(ServiceName.class); if (l != null && !ServiceLocator.class.equals(l.locator())) { locatorType = l.locator(); } else if (ln != null && ln.locator().length() > 0) { try { locatorType = Class.forName(ln.locator(), false, getTop().getDomainClassLoader()).asSubclass( ServiceLocator.class); } catch (ClassNotFoundException e) { return die(e, "Could not find the locator type specified in the @%s annotation %s", ServiceName.class.getCanonicalName(), ln.value()); } } else { locatorType = null; } return locatorType; }
@Override public Class<? extends ServiceLocator> resolveServiceLocator( Class<? extends RequestContext> requestContext) { Class<? extends ServiceLocator> locatorType; Service l = requestContext.getAnnotation(Service.class); ServiceName ln = requestContext.getAnnotation(ServiceName.class); if (l != null && !ServiceLocator.class.equals(l.locator())) { locatorType = l.locator(); } else if (ln != null && ln.locator().length() > 0) { try { locatorType = Class.forName(ln.locator(), false, getTop().getDomainClassLoader()).asSubclass( ServiceLocator.class); } catch (ClassNotFoundException e) { return die(e, "Could not find the locator type specified in the @%s annotation %s", ServiceName.class.getCanonicalName(), ln.value()); } } else { locatorType = null; } return locatorType; }
@Override public Class<? extends Locator<?, ?>> resolveLocator(Class<?> domainType) { Class<?> proxyType = getTop().resolveClientType(domainType, BaseProxy.class, false); if (proxyType == null) { return null; Class<? extends Locator<?, ?>> found = (Class<? extends Locator<?, ?>>) Class.forName(ln.locator(), false, getTop().getDomainClassLoader()).asSubclass(Locator.class); locatorType = found; } catch (ClassNotFoundException e) {
@Override public Class<? extends Locator<?, ?>> resolveLocator(Class<?> domainType) { Class<?> proxyType = getTop().resolveClientType(domainType, BaseProxy.class, false); if (proxyType == null) { return null; Class<? extends Locator<?, ?>> found = (Class<? extends Locator<?, ?>>) Class.forName(ln.locator(), false, getTop().getDomainClassLoader()).asSubclass(Locator.class); locatorType = found; } catch (ClassNotFoundException e) {
@Override public Class<? extends Locator<?, ?>> resolveLocator(Class<?> domainType) { Class<?> proxyType = getTop().resolveClientType(domainType, BaseProxy.class, false); if (proxyType == null) { return null; Class<? extends Locator<?, ?>> found = (Class<? extends Locator<?, ?>>) Class.forName(ln.locator(), false, getTop().getDomainClassLoader()).asSubclass(Locator.class); locatorType = found; } catch (ClassNotFoundException e) {