Task #1006 (new)
Document and possibly implement helper method for reattaching to a serialized stateful server
|Reported by:||jamoore||Owned by:||jamoore|
|Keywords:||ice, proxies, sessions||Cc:|
It is possible to reconnect both to a session as well as a stateful service in that session via Ice. This is, however, not documented anywhere.
# # Create on client and a stateful search service # client = omero.client() sess = client.createSession() sess.getQueryService().findAll("Image",None) search = sess.createSearchService() # # Record information from the service # seralized = str(search) category = search.ice_getIdentity().category # # In a separate process or later on... # client_2 = omero.client() sess_2 = client_2.createSession(category, category) prx = client_2.ic.stringToProxy(serialized) search_2 = omero.api.SearchPrx.checkedCast(prx) # # Now it is possible to work with the same stateful service. # search_2.onlyType("Image")