On Jul 23, 2006, at 10:28 PM, Marcel wrote:
I'm trying to get XMPP running. Lack of documentation is a bit of a pain - I'll jot a few notes down on the wiki once I get things running.
I haven't used shared sessions in a while. If you find a solution yourself, please share. Otherwise, I'll play with it in a few days. Actually other types of "EventBridges" should also work (such as peer- to-peer JavaGroupsBridge), but without trying it myself, I can't provide you the right configuration.
The connection to the XMPP server is no problem - I can see the user sessions on the server. However, messages aren't being passed between separate instances of the client. On the server, a separate chat room is being created for each client which connects.
This may or may not be wrong - don't recall the Jive server details.
The room is named not for the shared session name provided to the Hessian Connection but instead for the session handle generated by the XMPP bridge code.
IIRC this actually is ok.
Also, the documentation for the CayenneContext constructor which enables graph events suggests that the subjects are in ObjectContext when actually they are in DataChannel.
True - this has changed a few times during 1.2 cycle. Need to update the docs.
public ObjectContext getObjectContext(String address) { DataChannel channel; if (connections.containsKey(address)) { channel = connections.get(address); } else {HessianConnection connection = new HessianConnection (address, null, null, "conference");channel = new ClientChannel(connection); connections.put(address, channel); }ObjectContext context = new CayenneContext(channel, true, false); channel.getEventManager().addListener(this, "handleXMPP", Object.class, DataChannel.GRAPH_CHANGED_SUBJECT); channel.getEventManager().addListener(this, "handleXMPP", Object.class, DataChannel.GRAPH_FLUSHED_SUBJECT);return context; } public void handleXMPP(Object o) { System.out.println("XMPP : " + o); }
Looks ok, except you may want to be more precise with the event parameter class - use GraphEvent.class (same for 'handleXMPP' method parameter).
Andrus
