You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by se...@apache.org on 2012/12/12 23:20:30 UTC

svn commit: r1421024 - in /incubator/openmeetings/trunk/singlewebapp/WebContent: src/base/ src/base/components/upload/ src/base/hibernate/ src/modules/conference/ src/modules/conference/flexibleConferenceRoom/ src/modules/conference/moderation/ src/mod...

Author: sebawagner
Date: Wed Dec 12 22:20:25 2012
New Revision: 1421024

URL: http://svn.apache.org/viewvc?rev=1421024&view=rev
Log:
OPENMEETINGS-460 Cluster login working. Clients are redirected to slave for RTMP traffic, HTTP traffic still goes through master. Logout from room and return to master working too. There are a few drawbacks that needs to be fixed now and the rew txt documentation needs to be transformed into the website.
Also some WebService methods have been protected, if invoked before server has done startup, the request of a Bean via the WebApplicationContextUtils can cause the server to hang in the startup process.

Modified:
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/uploadWindowExplorer.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainAttributes.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainMethods.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/commonVideoComponentAdapter.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/flexibleConferenceRoom.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/interviewConferenceRoom.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/restrictedConferenceRoom.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/moderation/moderationPanel.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/testsetup/testSetup.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/fixedFileExplorerWhiteBoard.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/panels/maintoolspanel/mainToolsPanel.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/settings/privatemessages/newPrivateMessage.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/settings/searchuserprofile/searchUserProfileListItem.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/settings/viewUserProfile.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/mainAttributes.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/mainMethods.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.lzx

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/uploadWindowExplorer.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/uploadWindowExplorer.lzx?rev=1421024&r1=1421023&r2=1421024&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/uploadWindowExplorer.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/uploadWindowExplorer.lzx Wed Dec 12 22:20:25 2012
@@ -131,7 +131,7 @@
                               fileExplorerItem.fileName);
             	} else if (fileExplorerItem.isImage) {
             		canvas._drawarea.parent.parent.clearAreaAndAddImage(this.generateFileLink(fileExplorerItem.fileHash),0,0,
-                      canvas.protocol + '://'+canvas.rtmphostlocal+':'+canvas.red5httpport+canvas.httpRootKey+'DownloadHandler',
+                      canvas.getUrl() +'DownloadHandler',
                       fileExplorerItem.fileHash,"videoconf1","/","files",hib.conferencedomain);
             	}
             }
@@ -212,7 +212,7 @@
 	<simpleLabelButton name="upload" x="10" y="120" labelid="593" width="250" enabled="false" height="20">
 		<handler name="onclick">
 			<![CDATA[
-			var uploadurl = canvas.protocol + '://'+canvas.rtmphostlocal+':'+canvas.red5httpport+canvas.httpRootKey+ parent.servletName +'?' +
+			var uploadurl = canvas.getUrl() + parent.servletName +'?' +
 					'moduleName='+this.parent.uploadmodule +
                     '&publicSID='+canvas.publicSID +
                     '&filename='+encodeURIComponent(parent.txtFile.text) +

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx?rev=1421024&r1=1421023&r2=1421024&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx Wed Dec 12 22:20:25 2012
@@ -48,8 +48,6 @@
 <class name="hibRtmpConnection" extends="rtmpConnection" debug="false"
     src="$once{ this.getUrl() }" >
 
-    <attribute name="protocollName" type="string" value="rtmp" />
-    <attribute name="protocollPort" type="string" value="$once{ canvas.rtmpport }" />
     <attribute name="counterror" type="number" value="0" />
     
     <attribute name="loaderVar" value="null" />
@@ -108,9 +106,60 @@
     <attribute name="showKickMessage" value="false" type="boolean"/>
     <attribute name="showFullMessage" value="false" type="boolean"/>
          
+    <attribute name="useRTMPT" value="false" type="boolean" />
+    
+    <method name="getProtocol">
+    	if (canvas.useSSL) {
+    		return "rtmps";
+    	}
+    	if (this.useRTMPT) {
+    		return "rtmpt";
+    	}
+    	return "rtmp";
+    </method>
+    
+    <method name="getPort">
+    	if (canvas.useSSL) {
+    		if (canvas.isSlaveHosted) {
+    			return canvas.slaveRtmpsslport;
+    		}
+            return canvas.rtmpsslport;
+        }
+    	if (this.useRTMPT) {
+    		if (canvas.isSlaveHosted) {
+    			return canvas.slaveRtmpTunnelport;
+    		}
+    		return canvas.rtmpTunnelport;
+    	}
+    	if (canvas.isSlaveHosted) {
+    		return canvas.slaveRtmpport;
+    	}
+    	return canvas.rtmpport;
+    </method>
+    
+    <method name="getHost">
+    	if (canvas.isSlaveHosted) {
+    		return canvas.slaveRtmphostlocal;
+    	}
+    	return canvas.rtmphostlocal;
+    </method>
+    
+    <method name="getWebappRootKey">
+    	if (canvas.isSlaveHosted) {
+    		return canvas.slaveWebAppRootKey;
+    	}
+    	return canvas.webAppRootKey;
+    </method>
+         
+    <!-- 
+    	canvas.getUrl() can not be reused since it has different protocol and port 
+    	and potentially in cluster another host, the only thing that stays the same
+    	no matter if hosted on slave or on master, is the scope, so
+    	userScope always stays the same
+     -->
     <method name="getUrl">
-    	//canvas.getUrl() can not be reused since it has different protocol
-        return this.protocollName+'://'+canvas.rtmphostlocal+':'+this.protocollPort+'/'+canvas.webAppRootKey+'/'+this.userScope;
+        return this.getProtocol() + '://' + this.getHost() + ':' + this.getPort() 
+        			+ '/' + this.getWebappRootKey() + '/' + this.userScope;
     </method>
              
      <!--
@@ -174,8 +223,7 @@
                 this.counterror=0;
                 this.connect();
             } else {
-                this.setAttribute('protocollName','rtmpt');
-                this.setAttribute('protocollPort',canvas.rtmpTunnelport);
+            	this.useRTMPT = true
                 var src = getUrl();
                 this.setAttribute('src',src);
                 //Debug.write("new src ",this.src);

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainAttributes.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainAttributes.lzx?rev=1421024&r1=1421023&r2=1421024&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainAttributes.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainAttributes.lzx Wed Dec 12 22:20:25 2012
@@ -75,15 +75,16 @@ these properties will be overwritten by 
 
 <!--- 
     Port to use for the Server
-    This port is used to connec to the http-servlet
-    of the red5-servlet
+    This port is used to connect to the HTTP-Servlet
+    of the Red5-Servlet
  -->
 <attribute name="red5httpport" value="5080" type="string" />
 
 <attribute name="useSSL" value="false" type="boolean" />
 <attribute name="rtmpsslport" value="443" type="string" />
-    
+
 <!---
+#############################################################
     These colors are the main colors and style the hole application
  -->
 <attribute name="basebgcolorizer" value="" type="string" /> 
@@ -103,7 +104,25 @@ these properties will be overwritten by 
 
 <attribute name="showAudioVideoTest" value="true" type="boolean" />
 
+<!-- 
+#############################################################
+Attributes needed for clustering -->
+
+<attribute name="isSlaveHosted" value="false" type="boolean" />
+
+<!-- server object's address (not loaded from config.xml cause this variable is empty by default) -->
+<attribute name="slaveRtmphostlocal" value="" type="string" />
+<!-- rtmpport from slave's config.xml  --> 
+<attribute name="slaveRtmpport" value="5080" type="string" />
+<!-- rtmpTunnelport from slave's config.xml -->
+<attribute name="slaveRtmpTunnelport" value="8088" type="string" />
+<!-- rtmpsslport from slave's config.xml -->
+<attribute name="slaveRtmpsslport" value="443" type="string" />
+<!-- from slave's config.xml -->
+<attribute name="slaveWebAppRootKey" value="" type="string" /> 
+
 <!--
+#############################################################
     Id of the Recording that is played when access the Recordings Player via Direct Link URL
  -->
 <attribute name="roomRecordingId" value="0" type="number" />

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainMethods.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainMethods.lzx?rev=1421024&r1=1421023&r2=1421024&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainMethods.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainMethods.lzx Wed Dec 12 22:20:25 2012
@@ -114,12 +114,21 @@
     	   return colorArray[Math.round(Math.random()*10)];
     	]]>
     </method>
+    
+    <method name="getHttpHost">
+    	<![CDATA[
+	    	if (canvas.httphostlocal != null && canvas.httphostlocal.length > 0) {
+				return canvas.httphostlocal;
+			}
+			return canvas.rtmphostlocal;
+		]]>
+    </method>
         
 	<method name="getUrl">
-	<![CDATA[
-		return canvas.protocol + '://' + canvas.rtmphostlocal
-			+ ':' + canvas.red5httpport + canvas.httpRootKey;
-	]]>
+		<![CDATA[
+			return canvas.protocol + '://' + getHttpHost()
+				+ ':' + canvas.red5httpport + canvas.httpRootKey;
+		]]>
 	</method>
         
 	<method name="getServicesUrl">
@@ -209,6 +218,7 @@
         this.setAttribute('recordModule',canvas.myConfigSet.getPointer().xpathQuery('config/recordModule/text()'));
           
         this.setAttribute('httpRootKey',canvas.myConfigSet.getPointer().xpathQuery('config/httpRootKey/text()'));
+        this.setAttribute('httphostlocal',canvas.myConfigSet.getPointer().xpathQuery('config/httphostlocal/text()'));
         this.setAttribute('protocol',canvas.myConfigSet.getPointer().xpathQuery('config/protocol/text()'));  
         this.setAttribute('proxyType',canvas.myConfigSet.getPointer().xpathQuery('config/proxyType/text()'));
 
@@ -379,14 +389,6 @@
             }
         }
         
-        
-        hib.protocollPort = canvas.rtmpport;
-        
-        if (canvas.useSSL) {
-            hib.protocollName = "rtmps";
-            hib.protocollPort = canvas.rtmpsslport;
-        }
-        
         var scopeRoomId = lz.Browser.getInitArg('scopeRoomId');
         if (scopeRoomId != undefined){
             hib.userScope = scopeRoomId;

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/commonVideoComponentAdapter.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/commonVideoComponentAdapter.lzx?rev=1421024&r1=1421023&r2=1421024&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/commonVideoComponentAdapter.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/commonVideoComponentAdapter.lzx Wed Dec 12 22:20:25 2012
@@ -67,7 +67,7 @@
      -->
     <method name="reconnectSuccess" args="isInterview">
     	if ($debug) Debug.write("Send reconnectSuccess to ",canvas.rtmp_lc_name);
-    	canvas.sendViaLocalConnection(canvas.rtmp_lc_name, "reconnectSuccess", [canvas.thishib.src, canvas.publicSID, hib.userobject, isInterview]);
+    	canvas.sendViaLocalConnection(canvas.rtmp_lc_name, "reconnectSuccess", [canvas.thishib.src, canvas.publicSID, hib.userobject, isInterview, canvas.getHttpHost()]);
     </method>
     
     <handler name="onismoderator" reference="canvas" args="m">

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/flexibleConferenceRoom.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/flexibleConferenceRoom.lzx?rev=1421024&r1=1421023&r2=1421024&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/flexibleConferenceRoom.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/flexibleConferenceRoom.lzx Wed Dec 12 22:20:25 2012
@@ -101,6 +101,9 @@
         	canvas.currentActivityList = null;
         }
         
+        //reset if the user was connected to any slave
+        canvas.isSlaveHosted = false;
+        
         //@deprecated we will not use old screen sharing implementation
         //canvas._screens.clearAllSessions();
         this.logicalRoomLeave.doCall();

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/interviewConferenceRoom.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/interviewConferenceRoom.lzx?rev=1421024&r1=1421023&r2=1421024&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/interviewConferenceRoom.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/interviewConferenceRoom.lzx Wed Dec 12 22:20:25 2012
@@ -98,6 +98,9 @@
         	canvas.currentActivityList = null;
         }
         
+        //reset if the user was connected to any slave
+        canvas.isSlaveHosted = false;
+        
         //@deprecated we will not use old screen sharing implementation
         //canvas._screens.clearAllSessions();
         this.logicalRoomLeave.doCall();

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/restrictedConferenceRoom.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/restrictedConferenceRoom.lzx?rev=1421024&r1=1421023&r2=1421024&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/restrictedConferenceRoom.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/restrictedConferenceRoom.lzx Wed Dec 12 22:20:25 2012
@@ -96,6 +96,9 @@
             canvas.currentActivityList = null;
         }
         
+        //reset if the user was connected to any slave
+        canvas.isSlaveHosted = false;
+        
         //@deprecated we will not use old screen sharing implementation
         //canvas._screens.clearAllSessions();
         this.logicalRoomLeave.doCall();

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/moderation/moderationPanel.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/moderation/moderationPanel.lzx?rev=1421024&r1=1421023&r2=1421024&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/moderation/moderationPanel.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/moderation/moderationPanel.lzx Wed Dec 12 22:20:25 2012
@@ -101,13 +101,13 @@
             }
         
             var downloadurl = canvas.getUrl() + 'screen.upload?'
-                +'rtmphostlocal='+canvas.rtmphostlocal
+                +'rtmphostlocal='+canvas.getHttpHost()
                 +'&domain='+hib.conferencedomain
                 +'&organization_id='+organisation_id
                 +'&sid='+canvas.sessionId
                 +'&red5httpport='+canvas.red5httpport
-                +'&connectionType='+canvas.thishib.protocollName
-                +'&port='+canvas.thishib.protocollPort
+                +'&connectionType='+canvas.thishib.getProtocol()
+                +'&port='+canvas.thishib.getPort()
                 +'&publicSID='+canvas.publicSID
                 +'&httpRootKey='+canvas.httpRootKey
                 +'&languageAsString='+hib.userlang;

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx?rev=1421024&r1=1421023&r2=1421024&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx Wed Dec 12 22:20:25 2012
@@ -135,7 +135,7 @@
                   remotecontext="$once{ canvas.thishib }" activeErrorHandler="true" >      
         <netparam><method name="getValue"> return canvas.sessionId; </method></netparam>
         <netparam><method name="getValue"> return parent.parent.user_id; </method></netparam>
-        <netparam><method name="getValue"> return canvas.rtmphostlocal; </method></netparam>
+        <netparam><method name="getValue"> return canvas.getHttpHost(); </method></netparam>
         <netparam><method name="getValue"> return canvas.red5httpport; </method></netparam>
         <netparam><method name="getValue"> return canvas.httpRootKey; </method></netparam>
         <handler name="ondata" args="value">

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/testsetup/testSetup.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/testsetup/testSetup.lzx?rev=1421024&r1=1421023&r2=1421024&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/testsetup/testSetup.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/testsetup/testSetup.lzx Wed Dec 12 22:20:25 2012
@@ -62,18 +62,53 @@ RTMP-host, RTMP/RTMPT-port for the sessi
 			if ($debug) Debug.write("getServerForSession ",value);
 			//if return value is null, everything stays the same, session is on the current host
 			if (value != null){
-				//FIXME load config from slave server first, cause the slave could potentially  
-				//have other RTMP and RTMPT ports configured.
+				//is not loaded from config.xml from slave as this is variable is empty by default!
+				canvas.slaveRtmphostlocal = value.address;
 				
-				//the HTTP port stays with the master, if you want to cluster HTTP traffic use
-				//the regular Apache Tomcat mechanisms!
+				var slaveUrl = value.protocol + "://" + value.address + ":" + value.port + "/" + value.webapp + "/";
 				
+				var d = new Date();
+		        parent.myConfigSet.setAttribute("src", slaveUrl + "config.xml?random="+d.getTime());
+		        parent.myConfigSet.doRequest();
 				
 			} else {
+				//Hosted on master
+				canvas.isSlaveHosted = false;
 				this.parent.startConference();
 			}
 		</handler>
 	</netRemoteCallHib>	
+	
+	<!-- get values from config.xml from slave -->
+	<dataset type="http" name="myConfigSet" request="false" ondata="parent.parseResultsToSlaveClusterConfig()">
+	    <handler name="ondata">
+	        if ($debug) Debug.write("ondata");
+	    </handler>
+	    <handler name="onerror" args="e">
+	        if ($debug) Debug.write("onerror",e);
+	    </handler>
+	    <handler name="ontimeout" args="e">
+	        if ($debug) Debug.write("ontimeout",e);
+	    </handler>
+	</dataset>
+	
+	<!-- 
+		Parse the results so that the RTMP traffic points to the slave
+		and the HTTP traffic points to the master
+	 -->
+	<method name="parseResultsToSlaveClusterConfig">
+		
+        canvas.slaveRtmpport = Number(this.myConfigSet.getPointer().xpathQuery('config/rtmpport/text()'));  
+        canvas.slaveRtmpTunnelport = Number(this.myConfigSet.getPointer().xpathQuery('config/rtmpTunnelport/text()')); 
+        canvas.slaveRtmpsslport = Number(this.myConfigSet.getPointer().xpathQuery('config/rtmpsslport/text()')); 
+        canvas.slaveWebAppRootKey = this.myConfigSet.getPointer().xpathQuery('config/webAppRootKey/text()'); 
+		
+		if ($debug) Debug.write("parseResults: ",canvas.slaveRtmphostlocal,canvas.slaveRtmpport,canvas.slaveRtmpTunnelport,canvas.slaveRtmpsslport,canvas.slaveWebAppRootKey);
+		
+		//Hosted on slave
+		canvas.isSlaveHosted = true;
+		this.startConference();
+	</method>
     
     <method name="startConference">
     	<![CDATA[

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/fixedFileExplorerWhiteBoard.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/fixedFileExplorerWhiteBoard.lzx?rev=1421024&r1=1421023&r2=1421024&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/fixedFileExplorerWhiteBoard.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/fixedFileExplorerWhiteBoard.lzx Wed Dec 12 22:20:25 2012
@@ -148,13 +148,13 @@
             }
         
             var downloadurl = canvas.getUrl() + 'screen.upload?'
-                +'rtmphostlocal='+canvas.rtmphostlocal
+                +'rtmphostlocal='+canvas.getHttpHost()
                 +'&domain='+hib.conferencedomain
                 +'&organization_id='+organisation_id
                 +'&sid='+canvas.sessionId
                 +'&red5httpport='+canvas.red5httpport
-                +'&connectionType='+canvas.thishib.protocollName
-                +'&port='+canvas.thishib.protocollPort
+                +'&connectionType='+canvas.thishib.getProtocol()
+                +'&port='+canvas.thishib.getPort()
                 +'&publicSID='+canvas.publicSID
                 +'&httpRootKey='+canvas.httpRootKey
                 +'&languageAsString='+hib.userlang;

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/panels/maintoolspanel/mainToolsPanel.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/panels/maintoolspanel/mainToolsPanel.lzx?rev=1421024&r1=1421023&r2=1421024&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/panels/maintoolspanel/mainToolsPanel.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/panels/maintoolspanel/mainToolsPanel.lzx Wed Dec 12 22:20:25 2012
@@ -118,9 +118,8 @@
             if (this["_bgIcon"]) {
         	   this._bgIcon.setAttribute("visibility","hidden");
         	}
-            var imageurl = canvas.protocol + '://'+canvas.rtmphostlocal+':'+canvas.red5httpport+canvas.httpRootKey
-                                            +'public/cliparts/thumb/'
-                                            +canvas._drawarea.currentClipArtRessourceName;
+            var imageurl = canvas.getUrl() + 'public/cliparts/thumb/'
+                                           + canvas._drawarea.currentClipArtRessourceName;
             
             this._rscIcon.setSource(imageurl);
         </handler>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/settings/privatemessages/newPrivateMessage.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/settings/privatemessages/newPrivateMessage.lzx?rev=1421024&r1=1421023&r2=1421024&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/settings/privatemessages/newPrivateMessage.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/settings/privatemessages/newPrivateMessage.lzx Wed Dec 12 22:20:25 2012
@@ -129,7 +129,7 @@
             <netparam><method name="getValue">return parent.parent.parentMessageId;</method></netparam>
             <netparam><method name="getValue">return Number(parent.parent._roomtype.getValue());</method></netparam>
             <!--String domain, String port, String webapp-->
-            <netparam><method name="getValue"> return canvas.rtmphostlocal; </method></netparam>
+            <netparam><method name="getValue"> return canvas.getHttpHost(); </method></netparam>
             <netparam><method name="getValue"> return canvas.red5httpport; </method></netparam>
             <netparam><method name="getValue"> return canvas.httpRootKey; </method></netparam>
             <handler name="ondata" args="value">

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/settings/searchuserprofile/searchUserProfileListItem.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/settings/searchuserprofile/searchUserProfileListItem.lzx?rev=1421024&r1=1421023&r2=1421024&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/settings/searchuserprofile/searchUserProfileListItem.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/settings/searchuserprofile/searchUserProfileListItem.lzx Wed Dec 12 22:20:25 2012
@@ -149,7 +149,7 @@
 				  remotecontext="$once{ canvas.thishib }" activeErrorHandler="true" >      
 		<netparam><method name="getValue"> return canvas.sessionId; </method></netparam>
 		<netparam><method name="getValue"> return parent.parent.refObj.user_id; </method></netparam>
-    	<netparam><method name="getValue"> return canvas.rtmphostlocal; </method></netparam>
+    	<netparam><method name="getValue"> return canvas.getHttpHost(); </method></netparam>
     	<netparam><method name="getValue"> return canvas.red5httpport; </method></netparam>
     	<netparam><method name="getValue"> return canvas.httpRootKey; </method></netparam>
     	<handler name="ondata" args="value">

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/settings/viewUserProfile.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/settings/viewUserProfile.lzx?rev=1421024&r1=1421023&r2=1421024&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/settings/viewUserProfile.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/settings/viewUserProfile.lzx Wed Dec 12 22:20:25 2012
@@ -65,7 +65,7 @@
                   remotecontext="$once{ canvas.thishib }" activeErrorHandler="true" >      
         <netparam><method name="getValue"> return canvas.sessionId; </method></netparam>
         <netparam><method name="getValue"> return parent.parent.viewUserProfile.viewUserProfile.userObject.user_id; </method></netparam>
-        <netparam><method name="getValue"> return canvas.rtmphostlocal; </method></netparam>
+        <netparam><method name="getValue"> return canvas.getHttpHost(); </method></netparam>
         <netparam><method name="getValue"> return canvas.red5httpport; </method></netparam>
         <netparam><method name="getValue"> return canvas.httpRootKey; </method></netparam>
         <handler name="ondata" args="value">

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/mainAttributes.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/mainAttributes.lzx?rev=1421024&r1=1421023&r2=1421024&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/mainAttributes.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/mainAttributes.lzx Wed Dec 12 22:20:25 2012
@@ -50,6 +50,21 @@
 	<attribute name="userobject" value="null"/>
 
 	<attribute name="webAppRootKey" value="" type="string" />
+	
+	<!--- 
+		URL/IP to use for the Server for HTTP and HTTPS traffic.
+	    If this value is empty it will use the rtmphostlocal 
+	    variable (and in that way try to connect to the 
+	    domain-name the OpenMeetings-Client has been loading from)
+	 -->
+	<attribute name="httphostlocal" value="" type="string" />
+	
+	<!--- 
+	    Port to use for the Server
+	    This port is used to connect to the HTTP-Servlet
+	    of the Red5-Servlet
+	 -->
+	<attribute name="red5httpport" value="5080" type="string" />
 
 	<attribute name="httpRootKey" value="/" type="string" />
 	

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/mainMethods.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/mainMethods.lzx?rev=1421024&r1=1421023&r2=1421024&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/mainMethods.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/mainMethods.lzx Wed Dec 12 22:20:25 2012
@@ -40,6 +40,11 @@
         this.setAttribute('microphoneRateNormal',Number(canvas.myConfigSet.getPointer().xpathQuery('config/microphoneRateNormal/text()')));  
         this.setAttribute('microphoneRateBest',Number(canvas.myConfigSet.getPointer().xpathQuery('config/microphoneRateBest/text()')));  
         
+        //httphostlocal variable is loaded from the SWF8 application, cause it needs value, SWF10 app
+        //knows nothing about the rtmphostlocal, and we don't want to parse the URL from the browser
+        //in both applications to find out where the user loaded the SWF from and extract the domain/ip 
+        //from it
+        
         this.setAttribute('httpRootKey',canvas.myConfigSet.getPointer().xpathQuery('config/httpRootKey/text()'));
         this.setAttribute('protocol',canvas.myConfigSet.getPointer().xpathQuery('config/protocol/text()')); 
         this.setAttribute('proxyType',canvas.myConfigSet.getPointer().xpathQuery('config/proxyType/text()'));  
@@ -70,9 +75,16 @@
 		return tColor;
 	</method>
 	
+	<!-- 
+		httphostlocal is synced from the SWF8 application, it will always point to the master
+	 -->
+	<method name="getHttpHost">
+		return canvas.httphostlocal;
+    </method>
+	
 	<method name="getUrl">
 		<![CDATA[
-			return canvas.protocol + '://' + canvas.rtmphostlocal
+			return canvas.protocol + '://' + getHttpHost()
 				+ ':' + canvas.red5httpport + canvas.httpRootKey;
 		]]>
 	</method>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.lzx?rev=1421024&r1=1421023&r2=1421024&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.lzx Wed Dec 12 22:20:25 2012
@@ -89,8 +89,15 @@
         canvas.roomTypesInitValues = value;
     </method>
     
-    <method name="reconnectSuccess" args="connection_url,publicSID,userobject,isInterview">
+    <!-- 
+    	Synces some of the variables from the SWF8 to the SWF10.
+    	This also includes values for httphostlocal
+    	in case its a cluster'ed OpenMeetings installation the connection_url
+    	might point to the slave while the httphostlocal points to the master
+     -->
+    <method name="reconnectSuccess" args="connection_url,publicSID,userobject,isInterview,httphostlocal">
         if($debug) Debug.write("reconnectSuccess",connection_url,publicSID,userobject);
+        canvas.httphostlocal = httphostlocal;
         canvas.publicSID = publicSID;
         canvas.userobject = userobject;
         canvas.isInterview = isInterview;