Skip to content

DI wrapping ObjectCache for SQL object cache#20

Merged
milt merged 5 commits into
sql_cachefrom
sql_cache_di
Jul 2, 2026
Merged

DI wrapping ObjectCache for SQL object cache#20
milt merged 5 commits into
sql_cachefrom
sql_cache_di

Conversation

@milt

@milt milt commented Jul 1, 2026

Copy link
Copy Markdown
Member

Wraps our SQL object cache in a new ObjectCache DI construct for encapsulation and lifecycle control of the cache.

@milt milt requested a review from cliffcaseyyet July 1, 2026 19:17

@cliffcaseyyet cliffcaseyyet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall getting there, a few notes.

}

ObjectCache(XapiConfig xapiConfig, FOMXML fomXml, HLADecoderRegistry decoderRegistry, String jdbcUrl) {
this.catalog = FomCatalog.fromFomXml(fomXml);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why imperatively init a singleton? Just have a FomCatalog Bean with fomXML injected into it, then wire that in here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private static final Logger logger = LogManager.getLogger(InjectionHandler.class);

private volatile CacheQueryService queryService;
private ObjectCache objectCache;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird that we would do constructor injection when there are already wired beans. just change to autowired and kill the 1-arg constructor OR make it a 3-arg constructor to not mix DI methodologies.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and fef0683

@milt milt requested a review from cliffcaseyyet July 1, 2026 20:11
@milt milt merged commit 9fd8b93 into sql_cache Jul 2, 2026
1 check passed
@milt milt deleted the sql_cache_di branch July 2, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants