Skip to content

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

@beikov

Description

@beikov

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions