-
Notifications
You must be signed in to change notification settings - Fork 72
provide missing configuration in DatabaseClientFactory.Bean #1020
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One use case for the Bean is to support dependency injection -- especially in Spring.
The approach taken is to use a zero-argument constructor for the Bean and configure the Bean entirely with setters.
The constructors added in lines 1235 - 1247 seem inconsistent with this approach. Is there another consideration motivating these constructors?
Similar to the other fields of the bean, I believe the newClient() factory on lines 1478 / 1516 should make use of the added fields.
If the Bean has an inconsistent state (for instance, ambiguous configuration for authentication), it may be necessary to throw an error. Possibly that error checking already exists in the makeSecurityContext() method -- I haven't checked.
…#1020 - Fixed the code.
Addition to pull request - marklogic#1020.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be a call to clientFactoryBean.setSecurityContext(clientFactoryContext) before returning clientFactoryBean?
Approved with this change. After rebasing, please set the labels on the issue to test and assign to Ajit.
Thanks for squaring it away.
makeClientBeanFactory().
Addition to pull request - #1020.
Tests added:
|
So we can incorporate your pull request, please share the following:
java -version
)