Joe and others,
The flag works, but prevents running commands that are not threadsafe. I
think I am going to have to go to plan B which is build a server. Does
anyone have a something they have done or care to comment on the
following idea?
I am considering creating a class that builds an inbound and outbound
data queue. Next, I would submit a job that runs a program waiting on
the inbound queue. The inbound queue would contain commands or a quit.
As commands are processed, they would place the returned messages on the
outbound queue.
Knowing when to end the job is the biggest challenge. I could use a
connection timeout on the data queue, or use a proxy command processor
that is thread safe. The proxy could lock the data queue so that the
submitted command processor would know when the proxy ended by trying
for an exclusive lock.
David Morris
>>> David.Morris@plumcreek.com 04/01/02 11:38 AM >>>
Thanks Joe, poking around I found the setThreadSafe(true) method. It
looks like the behavior is not consistent accross releases, which could
be a problem. At least I have a fast way to prove the concept.
David Morris
>>> joepluta@PlutaBrothers.com 04/01/02 10:42 AM >>>
> From: David Morris
>
> I have a Java program that needs a
> specialized environment to run several
> CL commands. If I use the CommandCall
> class, I get a new job for each
> command.
David, I think there's a way to force the behavior you need. I forget
how
it works, but you might try the JTOpen website. The question has been
asked
in various ways many times.
Joe