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

Create JPA-base model with job type registry for processor auto-discovery #3

Open
beikov opened this issue Oct 17, 2019 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@beikov
Copy link
Member

beikov commented Oct 17, 2019

In clevercure I prototyped a JobInstance implementation that uses a job type integer discriminator for which is then used to lookup a job processer from a job type registry. The job type registry can be built by discovering JobInstanceProcessor classes via CDI or Spring. Instantiation of the processors can then also be handled via that DI framework and supports proper scoping and injection.
The jpa part should probably be independent of the job type registry part. This is kind of a declarative registration model.
By having such a job type registry, we can provide a default job processor factory implementation.

We should create a compatible model implementation for JPA and entity views. The difference is that the JPA model will have an abstract entity JobInstance using single table inheritance where the user has to create a subtype per job type, whereas the JobInstance entity for the entity view model will be a concrete type and the user has to create entity view subtypes per job type. Maybe make it a mapped super class so a user can extend the type and provide custom column naming, extensions etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant