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

Changed the class to enable CDI inicialization by Quarkus Arc implementation #310

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

dearrudam
Copy link
Contributor

Changes

Ref.: eclipse-jnosql/jnosql#572

  • Changed the class to enable CDI inicialization by Quarkus Arc implementation;

@genie-jnosql
Copy link
Collaborator

Can one of the admins verify this patch?

@dearrudam
Copy link
Contributor Author

dearrudam commented Feb 17, 2025

@otaviojava, I couldn't create a sample project using Amazon Neptune to reproduce this scenario at the moment, but I did create a similar project that connects to another graph database (Neo4j) using Tinkerpop as well. I ended up encountering a similar exception scenario.

I found that Quarkus Arc, the CDI implementation of Quarkus, behaves slightly differently from the Weld implementation. The Weld implementation correctly calls the annotated constructor, whereas Quarkus Arc does not. Instead, it first calls the no-argument constructor and then calls the annotated constructor with @Inject.

Anyway, I'll create a sample project and then open an issue at Quarkus Arc repository.

I did a little change to enable Quarkus Arc instantiate the components as expected. Could you review it?

UPDATE

The interesting thing is that it happens when the target beans come from dependencies. When we create the CDI bean with injectable args in the project itself, it works as expected.

@otaviojava otaviojava merged commit 19cabf9 into main Feb 19, 2025
3 checks passed
@otaviojava otaviojava deleted the fix-defaultgraphtemplate-cdi-initialization branch February 19, 2025 18:53
@otaviojava
Copy link
Contributor

@dearrudam please create a PR with a changelog!

@dearrudam
Copy link
Contributor Author

@otaviojava you're right! I forgot to do it...

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.

3 participants