-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello folks,
I'm playing with SharedObject API and Generic Server/Client. I'm tring
to create shared object in one bundle and to get it in another bundle.
In the first bundle, I get SharedObjectManager and call
ISharedObjectManager#addSharedObject:
public static final String DEMO_SHARED_OBJECT_ID = "foo";
//...
_server = createServer();
ISharedObjectManager manager = getServerSOManager();
ID id = manager.addSharedObject(createNewID(DEMO_SHARED_OBJECT_ID), new
MySharedObject(), null);
System.out.println("Added new SharedObject with ID = " + id.getName());
It works, I get "Added new SharedObject with ID = foo" in the OSGi console.
In another bundle activator:
createClients();
connectClients();
System.out.println("Clients created and connected");
ISharedObjectManager manager = getClientSOManager(0);
ISharedObject sharedObject =
manager.getSharedObject(createNewID(DEMO_SHARED_OBJECT_ID));
System.out.println(sharedObject);
and I get
"Clients created and connected
null"
in the OSGi Console :-(
May be I make mistake? Any ideas?