[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster] Multiple Sessions with one client?
the login name is used for two things: for authentication and as a
default for the subjectName.
What must be unique in XmlBlaster is the session name. The session name
is constituted by the subjectName + a sessionId (for example joe/1 the
subject is joe and the session is 1).
If you don't specify explicitly a session, by providing a login name,
the client library will generate a session name for you. So if you log
in as kai it will generate a session name of the type: kai/-3. Note here
the negative sessionId. The next time you log in as kai you will be
assigned kai/-4. This way you can have as many sessions on the user kai
as you wish.
Negative SessionIds mean the real globally unique SessionName will be
assigned on the server side.
The problem in your case is that you want failsafe behaviour in which
case you as a programmer take over the responsability to assign globally
unique session names to your sessions (since otherwise the server would
never recognize if you want a reconnect or a new connect).
Therefore when you log in the first time pass as your session name:
and the second time
and so on. You must make this since if you have failsafe behaviour you
have the control. The client library can not do it for you since it can
not determine your intentions.
> Michele Laghi schrieb:
>> Please read
>> for more details
> I read this before I sent my question. Furthermore I added a second
> connect call with different login name and password into my simple
> sample. The connect failed and the log says that I'm already connected.
> I'm afraid the article didn't help ME in this case.