[
https://issues.apache.org/jira/browse/ARTEMIS-4716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17837969#comment-17837969
]
Justin Bertram commented on ARTEMIS-4716:
-----------------------------------------
bq. I find it isn't a common operation, however, to want to incorporate a third
party tool in a way that integrates with the Jakarta EE ecosystem.
Generally speaking, integrating 3rd party implementations may not be common,
but is it fairly common with messaging. It's quite common to integrate a 3rd
party JMS implementation with an EE application server (e.g. MDBs consuming &
sending messages in an XA transaction).
bq. Luckily, Apache ActiveMQ Artemis has such integration, through the
"artemis-jakarta-client" package.
To be clear, there is nothing EE-specific about the {{artemis-jakarta-client}}
package. In fact, I would say its main use-case is in a Java SE context.
bq. I would like to take advantage of Artemis' integration with Jakarta and use
dependency injection via CDI instead, as that seems more robust, and guessing
that this is the recommended usage.
Using Jakarta classes really has nothing to do with CDI. Those two things are
mutually exclusive. Furthermore, I'm not sure if using CDI vs. manual JNDI
lookups is more robust or necessarily recommended more highly. I see CDI mainly
as a convenience for developers and not much more. I don't do a lot of EE
programming these days so maybe there's more to it that I'm not familiar with.
bq. What I would love to see, then, is an example of "artemis-jakarta-client"
being used in whichever way was intended by the authors, in a working Jakarta
EE project, for whichever Jakarta EE implementation.
As noted previously the {{artemis-jakarta-client}} has no specific ties to EE
use-cases. It's usable in SE and EE environments alike.
bq. Has "artemis-jakarta-client" ever been used in a Jakarta EE project, either
an example or a real-world one?
Yes. ActiveMQ Artemis is the JMS implementation shipped with
[WildFly|https://www.wildfly.org/].
bq. Regardless, this is precisely the type of step that I expect the
documentation to tell me whether I need or not.
That documentation should come from whatever application server you're using
based on your specific use-case. If all you're doing is injecting an ActiveMQ
Artemis {{ConnectionFactory}} then you'll need to inform the application server
about how to actually instantiate that object. You may need the ActiveMQ
Artemis JCA RA for that or you may not. Different application servers have
different requirements. This is beyond the scope of the ActiveMQ Artemis
documentation.
> Improve Jakarta Messaging / JMS documentation
> ---------------------------------------------
>
> Key: ARTEMIS-4716
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4716
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: JMS
> Affects Versions: 2.33.0
> Reporter: Daniel Martin
> Priority: Minor
>
> I'm struggling to understand [these
> instructions|https://activemq.apache.org/components/artemis/documentation/latest/using-jms.html]
> to use Artemis in the context of Jakarta Messaging which perhaps could be
> updated / simplified / improved.
> At the moment, I'm depending on {{artemis-jakarta-client}} and manually
> instantiating {{ActiveMQConnectionFactory}}. While investigating a memory
> leak that may come from my usage of ActiveMQ, I wanted to simplify this part
> and rely on dependency injection instead. However, I don't begin to
> understand how to do such thing.
> My expectation was to be able to use the {{@Inject}} annotation to get a
> reference to a {{ConnectionFactory}}, {{JMSContext}}, or similar and to be
> able to provide configuration such as broker address and credentials
> _somewhere_ as to end up with a reference to a {{Connection}} which is
> ultimately what I need. Is this possible? What's the recommended way? Is
> there any (working) reference examples?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)