[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[aspectj-users] Simulating multiple processes
- From: "Mike Schneider" <mikepschneider@xxxxxxxxx>
- Date: Sat, 10 May 2008 01:53:08 -0700
- Delivered-to: email@example.com
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=4CaVSEdH3nHHHB5blLQKuqwJM9Q0G1snajBIj0JTqxQ=; b=UC18xKWwarLLFnePXi8OWOqkVAaO9B5k9wFaXsTl05OfT7VBxcBgm4mlSQalCXoQe/IMqEhBw/lP7NnDqHB5+S7aG8mdEPx23ATWf7ovbEF95o1TSUlpk3tuoSpzztRjYzSkNtHZz7Mxn8+yThfjYRvNJH0XTMVOkRCVwRB+Y6Q=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=QqYCmPBri1DiVqFxzY9046Et2v1QRtlhk8vTH3Vyv7dAEvVTk67mKJ2FEHkR9AqxYXXlWM5E6uYWRT9bWHah6BqHlnYbHQm6axNUnJjHLFX55uYpcdWcqj+2b0hV3FpoAZa4vWU1/O2OqvHzmSnhj8/pLUsegbE6ujpoS1X56o4=
I work on a project that has multiple processes (ie virtual machines)
which communicate to each other through a messaging system. I'm
interested in finding a way to seamlessly run the different processes
on one virtual machine, for the purposes of testing and performance
issues, and also as a thought experiment for myself.
The idea would be to launch each main class in its own thread.
Obviously one can write a program to run each main method in its own
thread. But, shared resources like static variables, sockets, files,
threads, etc will create conflicts.
The one I'm thinking about is static variables. Would it be possible
to segregate the static variables of each main thread (and
descendents) into their own "namespace"? The variables inside one
thread would be visible to that thread (and ideally its descendants),
but not visible to the other mains and their descendants. Is this
possible? How could it be done?