How to declare service lifecycle dependencies (such as EJB) between deployments in JBoss EAP 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)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.