Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8454591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:03:57+00:00 2026-06-10T12:03:57+00:00

Is it possible to throw an exception from JBOSS which will terminate the process?

  • 0

Is it possible to throw an exception from JBOSS which will terminate the process? I don’t want to do something as crude as system.exit but the code our code runs as a plugin in a larger infrastructure and I want to check some states at startup and exit out of the system if data is missing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T12:03:59+00:00Added an answer on June 10, 2026 at 12:03 pm

    It’s probably message to use the ModelControllerClient to connect to the server and execute the :shutdown command.

    Something like:

    final ModelControllerClient client = createClient();
    try {
        final ModelNode op = new ModelNode();
        op.get(ClientConstants.OP).set(":shutdown");
        op.get(ClientConstants.OP_ADDR).setEmptyList();
        final ModelNode result = client.execute(op);
        if (result.get(ClientConstants.OUTCOME).asString().equals(ClientConstants.SUCCESS)) {
            // Do some there
    } finally {
        try {
            client.close();
        } catch (Exception ignore) {
        } 
    }
    

    If you’re just shutting down you could probably ignore the outcome.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to throw an exception from a runnable thread but its not possible
Question 1: Is is possible to throw an exception that will not be caught
It is possible to catch an exception and throw a new exception which wraps
Is it possible to throw an Exception from the Completed event of an Async
i have about 20 possible exception messages that i want thrown when an error
I don't think this is possible but I thought I'd throw it out there.
Possible Duplicate: difference between throw and throw new Exception() I'm a programmer working on
Is it possible to catch an exception thrown from one thread in another thread?
Possible Duplicate: How to print message from caught exception? Apologies if this is basic
Is it possible to throw an exception (could be any exception) with a customized

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.