} else if (!isEmpty(resourceRef.getResUrl())) {
//
if (classType != null && classType.equals(URI.class)) {
try {
//we need a newURI every time
bindingConfiguration = new BindingConfiguration(name, new FixedInjectionSource(new ManagedReferenceFactory() {
@Override
public ManagedReference getReference() {
try {
return new ValueManagedReference(new ImmediateValue(new URI(resourceRef.getResUrl())));
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
}
}, new URI(resourceRef.getResUrl())));
} catch (URISyntaxException e) {
throw MESSAGES.cannotParseResourceRefUri(e, resourceRef.getResUrl());
}
} else {
try {
bindingConfiguration = new BindingConfiguration(name, new FixedInjectionSource(new ManagedReferenceFactory() {
@Override
public ManagedReference getReference() {
try {
return new ValueManagedReference(new ImmediateValue(new URL(resourceRef.getResUrl())));
} catch (MalformedURLException e) {