Hi Pikaiyuan,
the callback session id is not the session id passed to the connection.
You have to explicitly set CallbackAddress.setSecretCbSessionId(...) and
add it to the connectQos:
pikaiyuan wrote:
> Hi,everyone
>
> I want to use the session ID which passed when the subscriber register the
> callback server with xmlblaster. And I did so(with cpp demo subscribedemo.cpp)
> 1、
> ConnectQos connQos(global_,username,passwd);
CallbackAddress cbA = new CallbackAddress(this.global);
cbA.setSecretCbSessionId("secretCbSessionID2");
connQos.addCallbackAddress(cbA);
> log_.info(ME, string("connecting to xmlBlaster. Connect qos: ") +
> connQos.toXml());
> ConnectReturnQos retQos = connection_.connect(connQos, this);
> sessionID_ = retQos.getSecretSessionId();
> 2、
> keep the sessionId passed in update method, and add this line in update method
> log_.plain(ME,"original sessionID is: "+sessionID_);
> log_.plain(ME,"sessionID passed by update is: "+sessionId);
> 3、
> start the subscriber: subscribedemo -interactiveUpdate true
> start the publisher: publishdemo -numPublish 100
> and the result like this
> original sessionID is: IIOP:00113D37370E43361142
> sessionID passed by update is: unknown
>
> (I had tried with java demo with the same problem)
>
> I had traced into src code and found callbackAddress.getSecretSessionId()
> method
> get the "unkown" value in sendUpdate() of CallbackcorbaDriver.java.
>
> Is there any problem?
There is no problem ;)
>
> thanks any way
>
>
> pikaiyuan
> 2004-05-10
>
>
I now have updated the requirement
http://www.xmlBlaster.org/xmlBlaster/doc/requirements/interface.update.html
Michele