powered by Jive Software

Multiple clients with one ID

I know that this question was asked. But I can’t find the answer.

My problem is that I user Strophe to connect to Openfire server. I need to login with one JID for any users. JID is ID of event, so users entered for this event automatically login to Openfire with that ID. When I’m trying to send message to this JID, it recived only by last logged in user, it is not that I want. How could I implement this functionality? Any ideas?

You need to set the property route-all.resources to true on the server.

I assume you are logging in with a different resource for each user though, and they all have the same priority.

Still not working

I see all sessions in admin panel. All clients are connected with one JID. Resources is different.

adf78791, ddc0aa2d and etc.

But When I send message from Adium to this clients, only one client recives message.

When I send message from Administrative Message, all clients recives that massege. How can I implement that functionality on my server?

This will only work if the message is sent to the base JID. If the ‘to’ is a full JID, then only that session will receive the message.

I didn’t understand. My code is:

try{

ChatManager manager = conn.getChatManager();

Chat chat = manager.createChat("user@example.com", new MessageListener() {

public void processMessage(Chat arg0, Message arg1) {

System.out.println("Recieved: " + arg1.getBody());

}

});

try {

Message xmppmessage = new Message();

xmppmessage.setBody(“Test message
”+new Date().getTime());

xmppmessage.setDate((new Date().getTime())+"");

xmppmessage.setFrom(conn.getUser());

chat.sendMessage(xmppmessage);

} catch (XMPPException e) {

e.printStackTrace();

}

}

But it is still only one user recieve message