ROP: shared session functionality over XMPP is broken
-----------------------------------------------------
Key: CAY-617
URL: http://issues.apache.org/cayenne/browse/CAY-617
Project: Cayenne
Type: Bug
Components: Cayenne Core Library
Versions: 1.2 [STABLE], 3.0, 2.0 [STABLE]
Reporter: Andrus Adamchik
Assigned to: Andrus Adamchik
Fix For: 1.2 [STABLE], 3.0, 2.0 [STABLE]
XMPP shared sessions would fail due to a bug in RemoteSession (so theoretically this should affect other bridge implementors as well). here is a patch that fixes it:
Index: /Users/andrus/work/cayenne-1.2/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/remote/RemoteSession.java
===================================================================
--- /Users/andrus/work/cayenne-1.2/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/remote/RemoteSession.java (revision 422485)
+++ /Users/andrus/work/cayenne-1.2/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/remote/RemoteSession.java (working copy)
..-121,6 +121,9 @@
return new HashCodeBuilder(71, 5).append(sessionId).toHashCode();
}
+ /**
+ * Returns server session id. This is often the same as HttpSession id.
+ */
public String getSessionId() {
return sessionId;
}
..-160,7 +163,8 @@
? eventBridgeParameters
: Collections.EMPTY_MAP;
- return factory.createEventBridge(SUBJECTS, sessionId, parameters);
+ // must use "name", not the sessionId as an external subject for the event bridge
+ return factory.createEventBridge(SUBJECTS, name, parameters);
}
catch (Exception ex) {
throw new CayenneRuntimeException("Error creating EventBridge.", ex);
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/cayenne/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
This archive was generated by hypermail 2.0.0 : Mon Jul 31 2006 - 22:14:21 EDT