@Override @Nullable public Object getTarget() { try { if (this.lookupOnStartup || !this.cache) { return (this.cachedObject != null ? this.cachedObject : lookup()); } else { synchronized (this) { if (this.cachedObject == null) { this.cachedObject = lookup(); } return this.cachedObject; } } } catch (NamingException ex) { throw new JndiLookupFailureException("JndiObjectTargetSource failed to obtain new target object", ex); } }
@Override @Nullable public Object getTarget() { try { if (this.lookupOnStartup || !this.cache) { return (this.cachedObject != null ? this.cachedObject : lookup()); } else { synchronized (this) { if (this.cachedObject == null) { this.cachedObject = lookup(); } return this.cachedObject; } } } catch (NamingException ex) { throw new JndiLookupFailureException("JndiObjectTargetSource failed to obtain new target object", ex); } }
@Override @Nullable public Object getTarget() { try { if (this.lookupOnStartup || !this.cache) { return (this.cachedObject != null ? this.cachedObject : lookup()); } else { synchronized (this) { if (this.cachedObject == null) { this.cachedObject = lookup(); } return this.cachedObject; } } } catch (NamingException ex) { throw new JndiLookupFailureException("JndiObjectTargetSource failed to obtain new target object", ex); } }