![]() |
JavaPartyA distributed companion to JavaCurrent release 1.9.5 Bernhard Haumacher, Thomas Moschny and Michael Philippsen |
|
Contents See also
Powered by
|
Multi-Application EnhancementSince JavaParty 1.9.4 IntroductionUp to now it was only possible to start exactly one application in a JavaParty environment. The multi-application enhancement allows running multiple JavaParty applications concurrently in the same environment. So JavaParty applications can be started successively without starting the runtime system for each program separately. Individual applications are handled as before and the user may shut down the JavaParty environment anytime he wants. On certain conditions, new virtual machines and thus computing power can be dynamically added to the runtime system. In either case the classes loaded by a JVM are shared by all concurrent applications. Therefore another goal is to deal with dynamically modified classes on demand. In doing so programs that run consecutively in the same environment can address different classes under the same name. Starting multiple JavaParty applicationsRecall that
the JavaParty runtime system is started by calling If the user decides to start multiple applications concurrently in the JavaParty environment, these applications share the loaded classes. The advantage is that for programs which use the same classes, the expenses for reading the class files only incur once. Note that different applications cannot use different versions of the same class. Static fields are initialized at load time and are accessed by all instances in common. Since static fields keep their values even when the application is terminated, they can influence other programs that run in the same JVM and use the corresponding class. The classes generated by the JavaParty compiler contain no static fields and thus no additional problems occur. Behaviour of the runtime environmentIf an application should operate at a higher performance, additional VMs may be added to the runtime environment. A precondition is that currently no application is executed in the JavaParty environment and the caches were flushed, as described below. When the user starts a new program in the runtime environment, a Semaphore guarantees that no virtual machines may register with the runtime system. After the start and during the execution of the program, the runtime system prevents further registrations of VMs. By default all caches of the runtime system are flushed as soon as an application is started in an empty JavaParty environment. Whether the environment has been used before or not is negligible because the caches must be initialized for the first program that runs in the environment. In order to
use the Java’s capabilities to cache classes in the memory, the user can pass
the parameter |
|||||||
| For comments and bug reports please use the JavaParty users mailing list. Page design & maintenance: Bernhard Haumacher. Last update: Fri Mar 30 18:46:00 GMT+01:00 2007 Java is a trademark of Sun Microsystems. |