How to declare service lifecycle dependencies (such as EJB) between deployments in JBoss EAP 7 / 6

Solution Verified - Updated -

Issue

  • How to declare service lifecycle dependencies (such as EJB) between deployments in JBoss EAP 6
  • We have a startup bean that depends on an MBean. They're both in the same ear file. Can we make the startup bean delay until the MBean is ready?
  • My application uses QueueReceiver in the code and when I shutdown jboss I stop consume the messages from the queue by stopping my thread from the ServletListener.
    the problem is that HornetQ shutdown asynchronously and we get exceptions when trying to access the Queue.
    How can I depend on the hornetQ service from servletListener so that it won't stop before my application stops?
  • We have two JBoss-Servers with configuration standalone-full-ha.xml. Both have two JMS-Servers. We have often the problem, that our application doesn´t get
    deployed because of an missing dependency to a JMS connection factory. The JMS Connection factory gets active after the deployment failure.
    And most times when I simply restart the server . Is this a kind of timing issue? How can we fix this?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.x
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content