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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:01:13+00:00 2026-05-27T12:01:13+00:00

I have a very very strange problem here. I have a desktop application written

  • 0

I have a very very strange problem here. I have a desktop application written with Spring 3.0.5-Release and Java 6.0. I’m also using Swing for the UI.

On startup, the application reads an application-context.xml file and instantiates a configuration bean from there, like this:

<bean id="config" class="my.blabla.Configuration">
    <property name="port" value="5555"></property>
    <property name="user" value="myUser"></property>
</bean>

In my application I’m using the properties from this Configuration bean.

Problem is now the following:

I package the application into a jar-file and deploy it on a machine.
I follow the following steps:

  1. In the application-context.xml I change the property user to userA.
  2. Now I run the application. Everything runs fine. In the log-file property user shows userA.
  3. I close the application.

  4. In the application-context.xml I change the property user to userB.

  5. I run the application. BUT In the log-file property user shows userA.

A few more infos. This does NOT happen when I debug the application. It only appears when the application is packaged and executed from command line.
I close my application via the default close button and have set this:

 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

Any idea, what is happening here? Is there a chance that spring beans somehow survive an application restart? Is there a chance that the java process is not shutdown?

I’m getting crazy. Any help is highly appreciated.

  • 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-27T12:01:13+00:00Added an answer on May 27, 2026 at 12:01 pm

    Are you running from the JAR file? Is the application context XML in that JAR file? Did you re-create the JAR after you change the bean from userA to userB? That would explain the mysterious behavior.

    Spring beans don’t survive a restart, any more than any in-memory value does. Your expectations don’t match reality.

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

Sidebar

Related Questions

I have a very strange problem. Using Gmap3, I place the pin on the
Have a very strange problem with Apache .htaccess URL Rewriting and Redirection. Here's my
I have one of our projects very strange problem here on http://konyak.georates.net/page-2/ we have
I have a very strange problem. I am using jQuery to intercept a particular
I'm encountering a very strange problem using g++ 4.1.2. I have a very basic
I have a very strange problem. (fyi - I'm using forms authentication and manually
I have a very strange problem when I using ajax in symfony 1.4. I've
I have a very strange problem in my code. I'm using Ogre and I'm
We have very strange problem, one of our applications is continually querying server by
I have a very strange problem. Under some elusive circumstances I fail to apply

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.