Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ecf-dev] Problem with SharedObject API

-----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?

Thanks.

- --
Pavel Samolisov

Meet me at:
Vkontakte.ru: http://vkontakte.ru/id3178981
Blog: http://samolisov.blogspot.com
Twitter: http://twitter.com/samolisov
XMPP/Jabber: samolisov@xxxxxxxxx
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrwZVcACgkQ20T0Vos3rqAsmwCfYGz0B8CT1hcKWuZrplGWPbPF
kHEAoLdaCBdC208/eUiIPSr1vSH+8uOj
=eZdh
-----END PGP SIGNATURE-----


Back to the top