Hi Matthew.
Thank you for you patience. I try to explain my intent little more comprehensive.
Imagine the following:
There exists a process A. Process A holds an object which it wants to give remote access to. Therefore the object needs to be added to an ObjectAdapter's ASM. BUT I don't want the adapter to exist in the process A. Instead I want there to be a process (let's call it B). In this process B I want the adapter to exist.
Now my problem is how to register the object in A at the adapter in process B?!
To solve this I'm currently trying to give access to the adapter in process B via a proxy to this adapter. This roughly looks like this:
Code:
/* Obtain an object proxie to the adapter running in process B */
Ice.ObjectPrx objPrx = mCommunicator.stringToProxy("RemoteObjectAdapter:tcp -h 127.0.0.1 -p 10000");
/* Now cast it to the type RemoteObjectAdapterPrx */
Remote.RemoteObjectAdapterPrx mRemoteAdapter = Remote.RemoteObjectAdapterPrxHelper.uncheckedCast(objPrx);
/* Finally process A adds his servant object to process B's adapter ASM */
mRemoteAdapter.add( new HelloI(), mCommunicator.stringToIdentity("HelloObject") );
My problem right now is, that the last call to the add method results in a NullPointerException and I don't know why.
If you ask for the reason, this is simply because of I will have a plenty of processes like A, which serve with objects. If I don't have a central ObjectAdapter I will end up with a plenty of adapters bound to a plenty of ports listening at.
I hope this is more comprehensive than my explenations before.
Regards,
Patrick