summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/resources/cometComponentContext.js
diff options
context:
space:
mode:
authorfmoga <fmoga@13f79535-47bb-0310-9956-ffa450edef68>2011-05-24 14:27:45 +0000
committerfmoga <fmoga@13f79535-47bb-0310-9956-ffa450edef68>2011-05-24 14:27:45 +0000
commite03b437442335d33ad52d31a750701933fb021d0 (patch)
tree7d77a8472ff525a2cbe2a05f91a5e85732f3f2e9 /sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/resources/cometComponentContext.js
parent17fb39cd0fe95baff5453bd12b2dab14d6018efc (diff)
Improve comet support. Add status to callback return type to determine when browser client has closed the page. Upgrade to atmosphere-jquery-0.7.1. Add support for multiple tabs. Fix and improve reliability of long polling technique.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1127080 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/resources/cometComponentContext.js')
-rw-r--r--sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/resources/cometComponentContext.js38
1 files changed, 22 insertions, 16 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/resources/cometComponentContext.js b/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/resources/cometComponentContext.js
index 9d9254199e..2518ee4367 100644
--- a/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/resources/cometComponentContext.js
+++ b/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/resources/cometComponentContext.js
@@ -1,21 +1,19 @@
/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
*/
var SCA = new function() {
@@ -24,10 +22,11 @@ this.TuscanyComet = {
appUrl: 'tuscany-comet',
connectedEndpoint : null,
connect : function(transport) {
- $.atmosphere.subscribe(document.location.toString() + this.appUrl,
+ $.atmosphere.subscribe(document.location.toString() + this.appUrl + "/connect",
this.callback,
$.atmosphere.request = {
- transport : transport
+ transport : transport,
+ maxRequest: 1000000000
});
this.connectedEndpoint = $.atmosphere.response;
},
@@ -45,4 +44,11 @@ this.TuscanyComet = {
}
};
+
+$.ajax({
+ url: document.location.toString() + this.TuscanyComet.appUrl + '/sessionId',
+ type: 'GET',
+ async: false,
+});
+
this.CometComponentContext = new Object();