Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Simulating multiple processes

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?

Mike Schneider

Back to the top