ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Multiprocess JVMs
Subject:   About Swing apps.
Date:   2002-07-30 03:47:54
From:   cakoose
About Swing applications...


Echnida has no problems destroying the top-level windows because the SecurityManager is notified when one of these is going to appear. Echnida keeps track of these and kills them at the end.


The main problems is that if one app crashes by grabbing the event-handling thread, all other Swing applications will appear to freeze because the event-handling thread is shared.


I haven't looked into it much, but I think you can replace the default EventQueue and create a separate thread per process (and add it to the app's thread group) so that the failure of one wont affect the others.


What is actually needed is some sort of extension to the Process/Runtime class which allows the quick startup of Java programs. All static variables should be duplicated so that they don't interfere. There are probably some hard-to-find isolation leaks when the Class objects are shared, but maybe some ThreadLocals will solve that.