Does anyone know how to use Java for Strong code mobility? Have you ever done it before?
Here's what I try to achieve.
Suppose we have 2 separate Java applications that communicate over network. App A and App B.
App A has a class x instantiated as an object, and has been using it. App B has no prior knowledge of this class x.
App A needs to migrate the instance of class x over to App B. App B should be able to dynamically load class x, and retains the state of class x.
I have Googled around and found a bunch of resources on how to dynamically load class at run-time. However, I'm not sure if the mechanism of transferring an object instance over network along with its state, and to invoke it dynamically is covered.
Any pointers would be very helpful, and thank you in advance!
NOTE: I'm mostly interested in how (i.e. the approach, way to think) this problem is solved, not what is used to solve this; this is because I'm tasked to come up with my own solution to solve this problem. Though pointing out libraries/framework is great, it would be ideal if answers are posted from people who have done something like this before (however rare).