Regarding the implementation of VE [message #123800] |
Tue, 25 April 2006 12:15  |
Eclipse User |
|
|
|
Greetings.
I am doing a small research on the VE Editor, as we need to expand it
for some other screen design uses. So far I have found out that it uses
two virtual machines, one which is instantiated to store and draw the
bean you are creating and the one where eclipse runs, which displays the
bean created by this first VM instance as an image. Now my question is,
do anyone know why is like that? I have found some documentation
explaining how this setup, works but I haven't found the reason why is
it like that. Isn't it easier just to use one virtual machine? what is
the reason to create a second one? is there any chance to deactivate
the external virtual machine and do anything just with one?
Thanks
|
|
|
|
|
Re: Regarding the implementation of VE [message #123904 is a reply to message #123830] |
Wed, 26 April 2006 09:57  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
We don't recommend DB connections when you are in design mode. That
would cause delays in the design. It could require special setup which
we wouldn't do.
Typically it is recommended that for things like DB connections that you
bracket them with code like:
if (!Beans.isDesignTime()) {
... do db stuff ...
}
And yes we simply terminate the vm when the class changes. There is no
cleanup call to send to your code.
--
Thanks,
Rich Kulp
|
|
|
Re: Regarding the implementation of VE [message #612751 is a reply to message #123800] |
Tue, 25 April 2006 12:41  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Because of several reasons. One is running user code in the VM of
Eclipse is dangerous. There is no way to know what the client code can
do. It could cause the Eclipse vm to crash. Second is that we can use a
different version of the VM than the one that is running eclipse. We can
use Eclipse running 1.4 and the other vm can be 1.5.
Also when classes change we would need to do funny classloader stuff to
get the new class in. With a separate vm we simply recreate the vm.
And there could be interactions between the settings of the Eclipse VM
that causes problems to the client code or visa-versa.
Mario Ortegon wrote:
> Greetings.
>
> I am doing a small research on the VE Editor, as we need to expand it
> for some other screen design uses. So far I have found out that it uses
> two virtual machines, one which is instantiated to store and draw the
> bean you are creating and the one where eclipse runs, which displays the
> bean created by this first VM instance as an image. Now my question is,
> do anyone know why is like that? I have found some documentation
> explaining how this setup, works but I haven't found the reason why is
> it like that. Isn't it easier just to use one virtual machine? what is
> the reason to create a second one? is there any chance to deactivate
> the external virtual machine and do anything just with one?
>
> Thanks
--
Thanks,
Rich Kulp
|
|
|
Re: Regarding the implementation of VE [message #612752 is a reply to message #123818] |
Wed, 26 April 2006 03:22  |
Eclipse User |
|
|
|
Hello!
Thanks for your answer. It really clarified some things for me, and now
I understand the reasons behind the design. However I still have one
question.
Rich Kulp wrote:
> Also when classes change we would need to do funny classloader stuff to
> get the new class in. With a separate vm we simply recreate the vm.
This means that the VM is closed and reopened every time the class
changes? or you wipe the loaded classes somehow? the reason of my
question is, let's say that I might want to have a DB connection, in the
second VM. Does this mean that every time that the class changes the
connection would be destroyed?
I am thinking of connecting these two VM's somehow to share information.
What do you think would be the best approach? I was thinking of using
a socket or RMI to get objects out of the first VM. Do you think this
is a right approach?
|
|
|
Re: Regarding the implementation of VE [message #612762 is a reply to message #123830] |
Wed, 26 April 2006 09:57  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
We don't recommend DB connections when you are in design mode. That
would cause delays in the design. It could require special setup which
we wouldn't do.
Typically it is recommended that for things like DB connections that you
bracket them with code like:
if (!Beans.isDesignTime()) {
... do db stuff ...
}
And yes we simply terminate the vm when the class changes. There is no
cleanup call to send to your code.
--
Thanks,
Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.10291 seconds