M
Michael Garvie
Hello everyone,
I have a client - server app where the client is always online and gets
sent objects of type, say, Fruit from the server. However now and again
the server goes down and Fruit gets recompiled for bug fixes etc.
Is there a way of making the client forget all the classes it has seen
so far and load everything again when it sees the next Fruit object?
Some people have suggested using something like URLClassLoader but this
has two problems:
1) Now we must create an instance of the class using no constructor..
So the server isn't really defining what object it sends to the clients
anymore, they read it from a static source.
2) Unsecure, the client must be granted createClassLoader
RuntimePermission which is very unsecure.
Does anyone know a way round this?
Cheers,
Miguel
I have a client - server app where the client is always online and gets
sent objects of type, say, Fruit from the server. However now and again
the server goes down and Fruit gets recompiled for bug fixes etc.
Is there a way of making the client forget all the classes it has seen
so far and load everything again when it sees the next Fruit object?
Some people have suggested using something like URLClassLoader but this
has two problems:
1) Now we must create an instance of the class using no constructor..
So the server isn't really defining what object it sends to the clients
anymore, they read it from a static source.
2) Unsecure, the client must be granted createClassLoader
RuntimePermission which is very unsecure.
Does anyone know a way round this?
Cheers,
Miguel