Skip to content

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.

4 participants