is there a way to restart/spawn a new idependent java VM from within
an existing and running java thread?
My goal is to have one single class which uses singleton in a third
party jar which I'm not getting a hold of (programmwise). But I need
two independend instances at the same time because they work with two
different settings.
There is now way for me to start two seperate processes. In fact the
systems works with two seperate processes, but this is only possible
in my development environment. Not for the final user.
If you have some link to look up or some working solution, please let
me know.
Thank you very much.
Kind regards
Heinrich Götzger
You may also want to see if playing around with the class loaders may
help; you might be able to fool Java into thinking that the third-party
class is really two separate classes if they are loaded by separate
classloaders. There could be subtle problems with that approach, though.
The third party class is a CORBA NameService and once the ORB is initialized,
it can't be used somewhere else in this process due to being a singleton.
Thanks
cheers
Heinrich
"Ingo Pakleppa" <ingo-imm...@kkeane.com> wrote in message news:<dY_L9.133$6k.1...@news1.west.cox.net>...
thanks for the reply. Sorry for not answering earlier. Had a loooong
XMas Break ;-)
The problem (my whish) is, that I like to have a jUnit test running
the CORBA servant, the NameService and the CORBA Client 'narrowing'
the servant from one single call. This is to check that the client
works against the specified server interface and its namingdirectory.
If I run all these three processes seperate, it works fine. Even on
Windows ;-)
But how to put it in jUnit, which is the actual problem, not the
respawn which I consider as one potential solution.
If you have a good other working solution for this, please let me
know.
Thanks
cheers
Heinrich
"Ingo Pakleppa" <ingo-imm...@kkeane.com> wrote in message news:<7enM9.8657$6k.4...@news1.west.cox.net>...
The content of my posting was:
Ingo,
thanks for the reply. Sorry for not answering earlier. Had a loooong
XMas Break ;-)
The problem (my whish) is, that I like to have a jUnit test running
the CORBA servant, the NameService and the CORBA Client 'narrowing'
the servant from one single call. This is to check that the client
works against the specified server interface and its namingdirectory.
If I run all these three processes seperate, it works fine. Even on
Windows ;-)
But how to put it in jUnit, which is the actual problem, not the
respawn which I consider as one potential solution.
If you have a good other working solution for this, please let me
know.
Thanks and kind regards
Heinrich