[MUD-Dev] Question about copyovers.
justice at softhome.net
Mon May 20 09:44:31 New Zealand Standard Time 2002
From: "Oliver Jowett" <oliver at randomly.org>
> If you don't requite a new VM, you could probably play with
> classloaders and "restart" the mud in the same VM with new code.
> i.e. the top-level code explicitly loads the core mud code in a
> separate (non-system) classloader; on copyover, you pass the
> Socket objects back out & the top level loads the new code in a
> new classloader and invokes it with the existing connections &
> whatever additional state is needed.
> You might have problems with references held to the "old" version
> at the system level -- outstanding threads and anything in the
> system libs that hold references. I *think* singletons in the mud
> code will be ok, as you get a new copy of the class & therefore a
> new singleton.
An interesting concept, I haven't played with Java classloading
much, but it could be a solution. The only objects directly
referenced in my startup proceedure is the starting class and the
networking code. So it'd be quite possible to load those
dynamically using a separate class-loader and then dereference the
classloader. It's something to look into when work slows down
enough for me to work on my mud again.
-- Kwon J. Ekstrom
MUD-Dev mailing list
MUD-Dev at kanga.nu
More information about the MUD-Dev