| In Geronimo Config, for any fields found to match
@Inject |
@ConfigProperty |
private Optional<String> property
|
We register a bean like this:
new ConfigInjectionBean<Optional<?>>(injection.type) { |
@Override |
public Optional<?> create(final CreationalContext<Optional<?>> context) { |
return config.getOptionalValue(keyProvider.apply(context), optionalType); |
} |
}
|
optionalType is the parameterized value within the Optional. Weld doesn't satisfy this injection point, but OWB does. |