Task #1006 (new)
Opened 11 years ago
Last modified 10 years ago
Document and possibly implement helper method for reattaching to a serialized stateful server
| Reported by: | jamoore | Owned by: | jamoore |
|---|---|---|---|
| Priority: | minor | Milestone: | Unscheduled |
| Component: | Documentation | Version: | 3.0-M1 |
| Keywords: | ice, proxies, sessions | Cc: | |
| Resources: | n.a. | Referenced By: | n.a. |
| References: | n.a. | Remaining Time: | n.a. |
| Sprint: | n.a. |
Description
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")
Change History (1)
comment:1 Changed 10 years ago by jmoore
- Milestone changed from OMERO-Beta4 to OMERO-Beta4-Docs
Note: See
TracTickets for help on using
tickets.
You may also have a look at Agilo extensions to the ticket.