powered by Jive Software

Spark changes Thread ID

I’'m developing a client on top of Smack and noticed the following when testing with Spark:

  • When my client initiates or responds to a chat session with another instance of my client, everything works fine

  • When my client responds to a chat session initiated by Spark, everything works fine

  • When my client initiates a chat with Spark, things don’‘t work. It appears that Spark is changing the threadId, so Smack creates a new Chat instance on the response message. Here’'s a trace (from the Spark debugger):

Note the change in threadId. Any idea why this is happening, or how to prevent?

Thanks,

Dan

I wrote a client using smack and I don’'t rely on the thread ID at all.

I keep all chat sessions in a Set. Whenever a new session is announced, I go search the Set by participant, and re-use that.

Of course this way, there can be only one chat window per session, but I don’'t see when you would need to allow multiple sessions with the same participant…