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 6675393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:51:01+00:00 2026-05-26T03:51:01+00:00

I use spring in a stand alone web application, which means there’s no servlet

  • 0

I use spring in a stand alone web application, which means there’s no servlet container but rather it runs in a JVM machine:

public class A {
    public static void main(String[] args) throws Exception {       
        AbstractApplicationContext  context = new ClassPathXmlApplicationContext("applicationContext.xml");
        context.registerShutdownHook();
    }   
}

Once built, i run it from a bash shell like this, for the sake of simplicity let’s call it process ‘main’ and figure that it’s run in a shell script:

me@local$ java A

This command starts a JVM and runs the main function above in the ‘main’ process, this main function never returns and thus:

  1. i find it hard to figure out how the process would notify the shell
    from any event in spring. I’m using jmx to monitorize the process
    and i need the shell to be aware of the spring load completion for
    it’s used to start other processes that depends upon this process
    ‘main’ and the bash script.
  2. The script where the process is started
    cannot continue.

For point 2, the obvious answer:

me@local$ java A &

Doesn’t build anything, since eventhough the script can continue, i cannot notify the shell when spring finished to load.

Thanks in advance.

  • 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-05-26T03:51:01+00:00Added an answer on May 26, 2026 at 3:51 am

    Why is it not enough just to output something on console after your application is ready? Also, you could connect by jmx right after a java process has been launched, then you could monitor jmx beans.

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

Sidebar

Related Questions

I use Spring IoC in my stand-alone Java application. When the application starts it
I use Spring MVC (via Spring Roo) to build a small web application for
We have started to use spring aop for cross cutting aspects of our application
I am trying to use Spring.NET with a C# application to populate a parameter
I wish to use Spring MVC to provide a REST web service. However, running
I'm setting up a Mule application and in it, I wanted to use Spring
There are several ActiveRecord styled query builder libraries out there. Some are stand alone
I am trying to use the Dojo/Dijit declarative menu with Spring ROO 1.1.4, but
In the standalone application(single threaded command line tool) I am developing ,I use Spring
We use Spring + Hibernate for a Webapp. This Webapp will be deployed on

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.