Multiple Connection to the same Glacier with python

gikgik Member Gennady KovalevOrganization: BIGURProject: Edera
Hi!

I read thread about Multiple Connection to the same Glacier and I try repeat it with python.

I write simple server application with empty ack() method, start glacier2.

First, I try to use one connection to router, but with custom Connection object:
defaultRouter = ic.getDefaultRouter()
router1 = Glacier2.RouterPrx.uncheckedCast(defaultRouter.ice_connectionId('first'))

base = router1.createSession('test', '')
# Xmm: In python base object here is None, but glacier here create the sesions successfuly

Then I try to call server:
server = Test.ServerPrx.uncheckedCast(ic.stringToProxy('Server:default -p 10000'))
server = server.ice_router(router1)

server.ack()

But glacier2 tell that no session defined for connection.

I dump network connections, and when client call server.ack() Ice use different network connection (different client's tcp port).

What I do wrong?

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    You also need to override the connection Id on the server proxy, try with:
    server = server.ice_connectionId("first").ice_router(router1)
    server.ack()
    

    Cheers,
    Benoit.
  • gikgik Member Gennady KovalevOrganization: BIGURProject: Edera
    benoit wrote: »
    Hi,
    You also need to override the connection Id on the server proxy

    Thank you!
    It worked.
Sign In or Register to comment.