Discussion:
ActiveMQ Broker Startup Sequence
Chris Owens
2018-02-26 19:39:13 UTC
Permalink
I have a webapp that runs correctly in tomEE+ 7.0.4, that uses logging via
logback to a JMS message topic.

I have divided the project into submodules, one containing the entities, one
containing the core logic, one containing the web MVC code, and one
containing just the persistence.xml, logback.xml, and related resources. The
web module includes via Maven dependency the entities, core, and
persistence/logging modules.

Now when I try to start the webapp, I get a connection refused exception on
port 61616 because Logback is trying to start the JMS topic appender before
the ActiveMQ broker is running. Once the application is fully running, I can
verify that the ActiveMQ broker is running by telnet to port 61616.

So what can I do to ensure that the activeMQ broker is running before
Logback tries to start a JMSTopicAppender? And why did this work before but
no longer now that the project is divided into sub modules?

Thanks




--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Chris Owens
2018-02-26 18:52:31 UTC
Permalink
I have a webapp project that runs correctly with tomEE plus 7.0.4.It uses
logback logging, and one of the loggers defined in logback.xml uses a JMS
message appenderTHe new module structure has a "core" module with all the
business logic, an "entities" module with all the entities, a "db" module
that contains only the persistence.xml and logback.xml files and supporting
resource definitions, and a "web" module that contains all the web code and
that includes all three other modules as dependencies. When I deploy the
resulting webapp, Logback tries to create the JMS Appender before the
ActiveMQ broker is up and running, which causes a connectionRefused
exception on port 61616. I have verified that the ActiveMQ broker eventually
starts correctly: I can telnet into port 61616. What should I do to ensure
that the ActiveMQ broker is up and running before logback tries to create
the appender?



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Loading...