Skip to content
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

Annotate Dependency Services Utilized by airbyte-bootloader #12392

Closed
4 tasks
jdpgrailsdev opened this issue Apr 27, 2022 · 0 comments · Fixed by #21073
Closed
4 tasks

Annotate Dependency Services Utilized by airbyte-bootloader #12392

jdpgrailsdev opened this issue Apr 27, 2022 · 0 comments · Fixed by #21073
Assignees
Labels

Comments

@jdpgrailsdev
Copy link
Contributor

jdpgrailsdev commented Apr 27, 2022

Tell us about the problem you're trying to solve

The project makes use of the constructor pattern and manually managed lifecycles to create and use objects. In order to make the code more dependency injection ready and to reduce the amount of work required to convert the services within the project to an application framework, the existing code base should be prepared for use in a dependency injection enabled container. In addition to this preparation work, the conversion of these objects into dependency injection ready, container managed objects will improve the modularity of the code base. Allowing the framework to manage the lifecycle of these objects also makes it possible to introduce interfaces, which will allow us to leverage the application framework to inject different implementations in different environments.

Describe the solution you’d like

To prepare the project to leverage dependency, all objects that are currently created manually and provided to other objects should be identified and annotated as a bean. This will be done using either the JSR-330 annotations annotations. This includes marking the class as a @Singleton so that the framework will identify it and manage it at runtime and by marking any required fields as injectable (e.g. @Inject). This solution will NOT change or remove constructors – that will occur when converting applications to use a framework.

In addition, any classes that should be managed by the dependency injection framework but will need to be refactored due to how they are created (e.g. via static builder methods or other static utility methods) should be documented. A follow-on ticket will be created to address these classes.

More Details

  • The GAV for the JSR-330 annotations is 'javax.inject:javax.inject:1'
  • Constructors should NOT be removed as part of this work. That will be done later.
  • Conversion of configuration from the Configs.java to framework configuration will be done later. Ignore the modification of the Configs.java.

Acceptance Criteria

  • All objects utilized by the airbyte-bootloader service should be annotated as managed beans
  • All members used by a managed bean should be annotated for injection
  • Any beans that cannot be easily created via an empty constructor should be documented for follow-on work
  • Project should build and run without any issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant