Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have developed a Swing application that controls execution of several scripts like jobs. I need to display the interim output of the jobs concurrently. I have followed MVC while writing the application. The application is working as expected. But off late I have the following requirements in hand:

  1. A few of the script jobs need special user privileges to execute so as to access specialized resources. There seems to be no way in Java to impersonate as a different user while running an application.[examined in this question]. Also trying to run the Swing application as a scheduled task in windows is not helping.
  2. Once started the jobs should be running even if the user logs off after starting the jobs. I am thinking of separating the execution logic from the UI and run that as a service; and introduce JMS in between the two layers so as to store/retrieve the interim the output.

Note: I need to run this application on windows.

Any ideas on meeting my requirements, will be highly appreciated.

share|improve this question

closed as too broad by gnat, MichaelT, Bart van Ingen Schenau, Kilian Foth, World Engineer Feb 3 '14 at 2:39

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

I even tried starting my application using a .NET utility which impersonates before starting my application, but without any luck. The javaw process still runs under the user who has logged in. – Harihar Das Oct 26 '13 at 13:44
Java is probably not the language for this type of application. Is there some reason you can't use an existing job scheduling software application like Quartz? – Gilbert Le Blanc Oct 27 '13 at 6:39
I need to display all information about the jobs running in the background in a GUI. The jobs have dependencies among themselves. I am not able to see how Quartz job solves my problem of requiring the jobs to be executed with a different user's credentials. Moreover my jobs will always be started manually at first and there is no need of repetition. – Harihar Das Oct 28 '13 at 4:29
up vote -1 down vote accepted

I designed my application as a 3 part architecture. A GUI part, a model part which runs as a windows service using IBM service wrapper and a JMS messaging middleware to communicate between the previous 2 components.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.