We're using a build.gradle file actually. Personally, I'd like to move the
dependencies to a pom.xml file, but that'll come later

On Wed, Jan 11, 2023, 12:31 PM Justin Bertram <jbert...@apache.org> wrote:

> I was under the impression that Gradle understood Maven pom files so that
> if your project depended on org.apache.activemq:artemis-server it would get
> all the transitive dependencies like commons-beanutils:commons-beanutils.
> Is that not the case?
>
>
> Justin
>
> On Wed, Jan 11, 2023 at 2:14 PM Michael Brennock <mbrenn...@gmail.com>
> wrote:
>
> > Ah, that explains why it's missing. We're using Gradle on this project to
> > import dependencies. I'll add that dependency as well
> >
> > On Wed, Jan 11, 2023, 12:06 PM Justin Bertram <jbert...@apache.org>
> wrote:
> >
> > > Looks like you need commons-beanutils:commons-beanutils:1.9.4 [1]. This
> > > dependency is declared in the artemis-server [2] module so you should
> get
> > > it automatically if you're using Maven to manage your dependencies.
> > >
> > >
> > > Justin
> > >
> > > [1]
> > >
> > >
> >
> https://search.maven.org/artifact/commons-beanutils/commons-beanutils/1.9.4/jar
> > > [2]
> > >
> > >
> >
> https://github.com/apache/activemq-artemis/blob/main/artemis-server/pom.xml#L158
> > >
> > > On Wed, Jan 11, 2023 at 1:26 PM Michael Brennock <mbrenn...@gmail.com>
> > > wrote:
> > >
> > > > John, I appreciate your suggestions! I will try to put them to work
> > > today.
> > > >
> > > > Perhaps they can help me resolve a runtime error I'm getting from
> > > > embeddedActiveMQ.start()? the stacktrace looks something like this:
> > > >
> > > > [23-Jan-10 14:16:50:330] [INFO] [BrokerInitializer:197] - Embedded
> > > Artemis
> > > > Broker being started
> > > > java.lang.NoClassDefFoundError:
> > > > org/apache/commons/beanutils/BeanIntrospector
> > > >    at
> > > >
> > > >
> > >
> >
> org.apache.activemq.artemis.utils.critical.CriticalAnalyzerPolicy.<clinit>(CriticalAnalyzerPolicy.java:28)
> > > >    at
> > > >
> > > >
> > >
> >
> org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration.<clinit>(ActiveMQDefaultConfiguration.java:593)
> > > >    at
> > > >
> > > >
> > >
> >
> org.apache.activemq.artemis.core.config.impl.ConfigurationImpl.<init>(ConfigurationImpl.java:111)
> > > >    at
> > > >
> > > >
> > >
> >
> org.apache.activemq.artemis.core.config.impl.FileConfiguration.<init>(FileConfiguration.java:34)
> > > >    at
> > > >
> > > >
> > >
> >
> org.apache.activemq.artemis.core.server.embedded.EmbeddedActiveMQ.initStart(EmbeddedActiveMQ.java:125)
> > > >    at
> > > >
> > > >
> > >
> >
> org.apache.activemq.artemis.core.server.embedded.EmbeddedActiveMQ.start(EmbeddedActiveMQ.java:115)
> > > >    at
> > > >
> > > >
> > >
> >
> com.pdxinc.eps.jms.broker.BrokerInitializer.createBroker(BrokerInitializer.java:198)
> > > >    ...
> > > >    ...
> > > > Caused by: java.lang.ClassNotFoundException:
> > > > org.apache.commons.beanutils.BeanIntrospector
> > > >    at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
> > > >    at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
> > > >    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
> > > >    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
> > > >     ... 18 more
> > > >
> > > >
> > > > Any idea what dependency might be missing?
> > > >
> > > >
> > > > On Wed, Jan 11, 2023 at 8:53 AM Justin Bertram <jbert...@apache.org>
> > > > wrote:
> > > >
> > > > > > In particular, AMQ 5 let's you create several objects off the
> same
> > > > > Session and use them concurrently...
> > > > >
> > > > > For what it's worth, the JMS specification states that Session
> > objects
> > > > are
> > > > > *not* thread-safe so any concurrent use is a spec violation. You
> may
> > > find
> > > > > implementations where concurrent use happens to work or may, in
> fact,
> > > be
> > > > > explicitly designed to work, but relying on non-spec behavior is
> not
> > > > > recommended as it handicaps portability (as you have found).
> > > > >
> > > > >
> > > > > Justin
> > > > >
> > > > > On Tue, Jan 10, 2023 at 11:18 AM John Lilley
> > > > > <john.lil...@redpointglobal.com.invalid> wrote:
> > > > >
> > > > >> Michael,
> > > > >>
> > > > >> We have recently migrated from AMQ 5 to Artemis, and we used
> > embedded
> > > > >> brokers for testing, so I might be able to help.
> > > > >>
> > > > >> Jolokia (web service API) is not available in the embedded
> brokers,
> > we
> > > > >> migrated to using the queue-based management API instead for
> things
> > > like
> > > > >> queue counts and lists. But I think that absence of the web server
> > is
> > > > true
> > > > >> for both AMQ 5 and Artemis.
> > > > >>
> > > > >> We create the embedded broker using
> > > > >> EmbeddedActiveMQ broker = new EmbeddedActiveMQ();
> > > > >> broker.setConfigResourcePath("mybroker.xml");
> > > > >> broker.start();
> > > > >> where mybroker.xml is the Artemis broker.xml file stored as a
> > > top-level
> > > > >> java resource
> > > > >>
> > > > >> We found that Artemis is much more strict about prohibiting
> > > multi-thread
> > > > >> access to JMS objects than AMQ 5, and we had to refactor some code
> > > > because
> > > > >> of that. In particular, AMQ 5 let's you create several objects off
> > the
> > > > same
> > > > >> Session and use them concurrently; Artemis does not, you must
> make a
> > > new
> > > > >> Session for each.
> > > > >>
> > > > >> Artemis clients use thread pooling; it is much more efficient and
> > you
> > > > can
> > > > >> create many more MessageListener instances without incurring a lot
> > of
> > > > idle
> > > > >> threads.
> > > > >>
> > > > >> We found that using session/producer pooling was more important
> with
> > > > >> Artemis than it was with AMQ 5, because of increased broker memory
> > > > >> footprint* for queues and sessions. That being said, pooling is
> > > awesome.
> > > > >>
> > > > >> Similarly, we found RPC reply-to queue pooling to also be
> important.
> > > > >>
> > > > >>    - We did not measure this directly with controlled testing.
> > Memory
> > > > >>    observations came from production systems running load tests
> and
> > > > there
> > > > >>    could have been other factors such as session leakage.
> > > > >>
> > > > >>
> > > > >>
> > > > >> [image: rg] <https://www.redpointglobal.com/>
> > > > >>
> > > > >> John Lilley
> > > > >>
> > > > >> Data Management Chief Architect, Redpoint Global Inc.
> > > > >>
> > > > >> 888 Worcester Street, Suite 200 Wellesley, MA 02482
> > > > >>
> > > > >> *M: *+1 7209385761 <+1%207209385761> |
> > john.lil...@redpointglobal.com
> > > > >>
> > > > >> -----Original Message-----
> > > > >> From: Michael Brennock <mbrenn...@gmail.com>
> > > > >> Sent: Friday, January 6, 2023 12:50 PM
> > > > >> To: users@activemq.apache.org
> > > > >> Subject: Re: Looking for guidance on conversion from embedded
> > activemq
> > > > to
> > > > >> artemis
> > > > >>
> > > > >> *** [Caution] This email is from an external source. Please use
> > > caution
> > > > >> responding, opening attachments or clicking embedded links. ***
> > > > >>
> > > > >> Thank you for your feedback Justin. I will be more specific in my
> > > > >> descriptions.
> > > > >>
> > > > >>    - First, the activeMQ application creates an instance of
> > > > >>    BrokerService from BrokerFactory.createBroker(), with a
> > > > activemq-config.xml
> > > > >>    for its argument
> > > > >>    - Next, the queues themselves are loaded one at a time by
> > locating
> > > > >>    their beans. The beans are wired in the classic spring fashion
> > from
> > > > >>    eps.broker.xml. The connected are created with
> ConnectionFactory
> > > and
> > > > >>    started with start()
> > > > >>       - (I'm perfectly happy to update this to the Artemis
> > > configuration
> > > > >>       file method instead)
> > > > >>
> > > > >> If I understand correctly, I need to replace the references to
> > > > >> activemq-broker-initializer with EmbeddedActiveMQ, which comes
> from
> > > > >> Artemis. Next, I need to use ConnectionFactory and Queue classes
> > from
> > > > JMS
> > > > >> to add the message queues to the embedded server I created with
> > > > >> EmbeddedActiveMQ. Is that at least heading in the right direction?
> > > > >>
> > > > >> Thanks again for your help,
> > > > >>
> > > > >> Michael
> > > > >>
> > > > >> On Fri, Jan 6, 2023 at 11:16 AM Justin Bertram <
> jbert...@apache.org
> > >
> > > > >> wrote:
> > > > >>
> > > > >> > There's just not enough detail in what you've stated to provide
> > any
> > > > >> > concrete help with your migration.
> > > > >> >
> > > > >> > You said, "...it looks like BrokerService is used throughout the
> > > > >> > application," but you've provided no details about *how*
> > > BrokerService
> > > > >> > is used. Most applications using an embedded broker are pretty
> > > > >> > straightforward when it comes to broker configuration. They
> > > typically
> > > > >> > create a broker instance, configure it with a few endpoints
> (e.g.
> > > > >> > queues, topics, etc.), configure a couple of other parameters,
> > start
> > > > >> > it, use it, and when the application is done it shuts the broker
> > > down.
> > > > >> > Does your application follow this basic pattern? Does it
> configure
> > > the
> > > > >> > broker programmatically or does it load configuration files?
> Does
> > it
> > > > >> > rely on automatic creation of endpoints?
> > > > >> >
> > > > >> > In order to replace BrokerService with EmbeddedActiveMQ we need
> > > > >> > specific details about how BrokerService is being used.
> > > > >> >
> > > > >> > Hope that helps!
> > > > >> >
> > > > >> >
> > > > >> > Justin
> > > > >> >
> > > > >> > On Fri, Jan 6, 2023 at 12:21 PM Michael Brennock <
> > > mbrenn...@gmail.com
> > > > >
> > > > >> > wrote:
> > > > >> >
> > > > >> > > Thanks for the quick reply!
> > > > >> > >
> > > > >> > > For a more specific question, it looks like BrokerService is
> > used
> > > > >> > > throughout the application, as well as the
> active-mq-initializer
> > > > >> > > bean
> > > > >> > from
> > > > >> > > activeMQ.
> > > > >> > > To clarify, I inherited this project from other developers who
> > are
> > > > >> > > long gone. I started working on this because I briefly worked
> > on a
> > > > >> > > message
> > > > >> > queue
> > > > >> > > system before.
> > > > >> > >
> > > > >> > > On Thu, Jan 5, 2023, 8:41 PM Justin Bertram <
> > jbert...@apache.org>
> > > > >> wrote:
> > > > >> > >
> > > > >> > > > EmbeddedActiveMQ is the class you want to use for embedding
> > > > >> > > > ActiveMQ Artemis. The BrokerService is a class from ActiveMQ
> > > > >> > > > "Classic". It is
> > > > >> > used
> > > > >> > > > in the ActiveMQ Artemis code-base only for testing purposes.
> > You
> > > > >> > > > won't
> > > > >> > > use
> > > > >> > > > it at all when migrating.
> > > > >> > > >
> > > > >> > > > For additional help you'll have to ask more specific
> > questions.
> > > > >> > > >
> > > > >> > > >
> > > > >> > > > Justin
> > > > >> > > >
> > > > >> > > > On Thu, Jan 5, 2023 at 4:45 PM Michael Brennock
> > > > >> > > > <mbrenn...@gmail.com>
> > > > >> > > > wrote:
> > > > >> > > >
> > > > >> > > > > Good afternoon,
> > > > >> > > > > I've been tasked to migrate an existing application's
> > message
> > > > >> > > > > broker
> > > > >> > > from
> > > > >> > > > > ActiveMQ to Artemis. I was wondering if I could get some
> > help
> > > > >> > > > > troubleshooting my solution?
> > > > >> > > > >
> > > > >> > > > > We had some initial success replacing our embedded
> activeMQ
> > > > >> > > > > broker
> > > > >> > > with a
> > > > >> > > > > standalone broker that runs outside the application and
> > still
> > > > >> > > > > uses
> > > > >> > the
> > > > >> > > > > original message queues defined in activeMQ. I tried to
> > follow
> > > > >> > > > > the information in this guide for creating either an
> > > > >> > > > > EmbeddedActiveMQ or
> > > > >> > a
> > > > >> > > > > BrokerService. Something about the intended design path is
> > > > >> > > > > unclear to
> > > > >> > > me,
> > > > >> > > > > even after reading the manual (1) and scouring the code
> from
> > > the
> > > > >> > github
> > > > >> > > > > page for answers (2)
> > > > >> > > > >
> > > > >> > > > > Can anyone offer advice on how to migrate from embedded
> > > ActiveMQ
> > > > >> > > > > to embedded Artemis? I feel like I missed something
> > important
> > > in
> > > > >> > > > > the
> > > > >> > > > migration
> > > > >> > > > > documentation
> > > > >> > > > >
> > > > >> > > > > (1)
> > > > >> > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > >
> https://activemq.apache.org/components/artemis/documentation/latest/em
> > > > >> > bedding-activemq.html
> > > > >> > > > >
> > > > >> > > > >
> > > > >> > > > > (2)
> > > > >> >
> https://github.com/apache/activemq-artemis/search?q=brokerService
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >> PLEASE NOTE: This e-mail from Redpoint Global Inc. (“Redpoint”) is
> > > > >> confidential and is intended solely for the use of the
> individual(s)
> > > to
> > > > >> whom it is addressed. If you believe you received this e-mail in
> > > error,
> > > > >> please notify the sender immediately, delete the e-mail from your
> > > > computer
> > > > >> and do not copy, print or disclose it to anyone else. If you
> > properly
> > > > >> received this e-mail as a customer, partner or vendor of Redpoint,
> > you
> > > > >> should maintain its contents in confidence subject to the terms
> and
> > > > >> conditions of your agreement(s) with Redpoint.
> > > > >>
> > > > >
> > > >
> > >
> >
>

Reply via email to