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

deployment module always tries to register Artemis JMS CF for reflection #107

Closed
gemmellr opened this issue Apr 24, 2023 · 2 comments
Closed

Comments

@gemmellr
Copy link
Contributor

gemmellr commented Apr 24, 2023

When trying to use quarkus-pooled-jms with a client other than the Artemis JMS client, a warning is emitted during native builds due to failure to register the ActiveMQConnectionFactory class for reflection:

Warning: Could not resolve org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory for reflection configuration. Reason: java.lang.ClassNotFoundException: org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.

Presumably this is because it always tries to register it, without checking to see if it is present:

reflectiveClasses.produce(
ReflectiveClassBuildItem.builder("org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory")
.methods(true).fields(false).build());

It clearly shouldn't if it isn't present. It isnt clear to me that that it should be doing so even if it is present.

@zhfeng
Copy link
Contributor

zhfeng commented Apr 25, 2023

Yeah, it should be removed in main branch but it seems that this registration still be needed in 1.x. I think there is something diffierent with org.messaginghub:pooled-jms between 3.1.0 and 2.0.5

zhfeng added a commit to zhfeng/quarkus-pooled-jms that referenced this issue Apr 25, 2023
zhfeng added a commit to zhfeng/quarkus-pooled-jms that referenced this issue Apr 25, 2023
zhfeng added a commit to zhfeng/quarkus-pooled-jms that referenced this issue Apr 25, 2023
@zhfeng zhfeng closed this as completed in 406e337 Apr 25, 2023
@gemmellr
Copy link
Contributor Author

The only change I recall making between 2.x and 3.x is that there used to be some checks on whether a given javax.jms.ConnectionFactory actually implemented certain methods, allowing it to still work with JMS 1.1 impls that didnt implement bits newer than them. Those were removed with the switch to jakarta.jms.ConnectionFactory since all jakarta impls have to be 3.x providers.

Still feels like quarkus-artemis should be the thing doing registrations in any case.

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

No branches or pull requests

2 participants