T
Terry Paterson
Hi There,
I'm developing a 3-Tier application using RMI - and attempting to use
"Smart Proxys"
(Proxy objects on the client which cache some of the remote objects
state, and get other state / deligate other methods to the remote
object)
I don't have any problem getting a "Smart Proxy" to work -- but what I
would like is to have my "Smart Proxy" observe the Remote Object - in
order to find out about changes to the cached state.
I want to do this by having my S.P. implement a RemoteObserver
interface :
public interface RemoteObserver extends Remote {
public void update(RemoteObservable obs, Object data) throws
RemoteException;
}
and this would of course mean that instead of my S.P. being serialized
and sent across the network -- I would instead only get a reference to
a Remote S.P. which exists on the server - and negating the whole
reason for having the S.P. in the first place.
I gather from a few other articles I've found scattered around that
this might be possible using a modified class loader -- but havn't
found any examples...
Can anyone give me a pointer as to how I might solve this problem ?
Many Thanks
I'm developing a 3-Tier application using RMI - and attempting to use
"Smart Proxys"
(Proxy objects on the client which cache some of the remote objects
state, and get other state / deligate other methods to the remote
object)
I don't have any problem getting a "Smart Proxy" to work -- but what I
would like is to have my "Smart Proxy" observe the Remote Object - in
order to find out about changes to the cached state.
I want to do this by having my S.P. implement a RemoteObserver
interface :
public interface RemoteObserver extends Remote {
public void update(RemoteObservable obs, Object data) throws
RemoteException;
}
and this would of course mean that instead of my S.P. being serialized
and sent across the network -- I would instead only get a reference to
a Remote S.P. which exists on the server - and negating the whole
reason for having the S.P. in the first place.
I gather from a few other articles I've found scattered around that
this might be possible using a modified class loader -- but havn't
found any examples...
Can anyone give me a pointer as to how I might solve this problem ?
Many Thanks