I'm having a CORBA server written in Java (OpenORB), and, since the
CORBA references to the clients are changed every time the server
restarts, whenever I do some changes to the server, all the clients have
to restart their apps.
Now, if the 'meat' of the code could be packaged in one jar file, and
the CORBA server serving the object references in another, and whenever
I changed the 'meat', could the CORBA server jar dynamically reload the
'meat' jar, so that the clients still had valid references?
That is, is it possible in Java to have one jar file reload/refresh
another jar file it is dependent on, without being itself being restarted?
RCS
Erwin Moller - 17 Mar 2004 11:26 GMT
> I'm having a CORBA server written in Java (OpenORB), and, since the
> CORBA references to the clients are changed every time the server
[quoted text clipped - 10 lines]
>
> RCS
Hi,
Not sure, but this can be relevant in your situation.
I had trouble with Netbeans when I changed a jar file.
I got exceptions complaining about 'invalid loc header'.
I asked about this at the netbeansbugparade.
They asked at Sun.
Sun claimed at one point that changing jar-files when running in a JVM is
not supported.
-----------------------
Duplicate of 4425695. Modifying a jar file on the fly is not supported any
more than changing a shared library or a class file on the fly. The only
reason way to replace a jar file is to guarantee that the classloader (and
all of its loaded classes and all objects of those) are no longer in use
and suitable for garbage collection.
-----------------------
Again, I am not sure if this is relevant to your problem.
You might want to read the whole bugreport with comments made by smarter
people than me. :P
http://developer.java.sun.com/developer/bugParade/bugs/4826081.html
Regards,
Erwin Moller
RCS - 17 Mar 2004 16:40 GMT
> > That is, is it possible in Java to have one jar file reload/refresh
> > another jar file it is dependent on, without being itself being restarted?
> Not sure, but this can be relevant in your situation.
> I had trouble with Netbeans when I changed a jar file.
[quoted text clipped - 4 lines]
> Sun claimed at one point that changing jar-files when running in a JVM is
> not supported.
Too bad! I was hoping for something like in the C/C++ world of
loadLibrary("meat"), where one can exchange the meat.dll on the fly as long
as no function has it loaded at the moment.
Thanks!
RCS