From: Larry Riedel <Larry@Riedel.org> - 2000-10-26 05:11:15
Can I run multiple independent instances
of BeanShell inside a single JVM without
interaction problems? Let's say for
example that I create a little daemon
inside the JVM which listens on a TCP port
and when someone connects, the daemon
creates for them their own independent
instance of BeanShell, and they are not
impacted by other users connected to the
same JVM (other than performance, etc).
I am aware of the concept of having
multiple "sessions" connected to a single
BeanShell instance in "server mode".
I am only concerned about the creation of
multiple BeanShell instances in one JVM;
there might not be any sort of server or
network connection at all. I might be
something like a "cron" daemon which
runs scripts as batch jobs, etc.
On Thu, Oct 26, 2000 at 05:11:12AM -0000, Larry Riedel wrote:
> Can I run multiple independent instances
> of BeanShell inside a single JVM without
> interaction problems? Let's say for
Yes. In fact BeanShell should be thread safe within a single instance as well.
BeanShell currently creates instances of the interpreter to handle
sub-evaluations (eval statements) so this should be pretty solid.
That said, I have not done any kind of firm testing to insure that BeanShell
does not have any hidden problems with lots of instances of the interpreter.
Please use the alpha4 (which should be released as beta any day now).