Using System.exit() during jboss startup

Solution Verified - Updated -

Issue

we try to develop a logic where if our application listener fails to initiate the application we shutdown the JVM using System.exit(1).
However, this causes 'JBoss Shutdown Hook' to run, but does not shutdown JBoss.
JBoss remains stuck forever.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.x
    • 4.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