|
From: <tre...@us...> - 2008-01-30 22:43:42
|
Revision: 698
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=698&view=rev
Author: trevorolio
Date: 2008-01-30 14:43:45 -0800 (Wed, 30 Jan 2008)
Log Message:
-----------
Added the requested IP number to the service doc so the applet can work against round robin dns clusters, on Windows, in Firefox. Also tweaked the renderer graphics config to indicate a lowest level of texture bit depth, which also has the nice side effect of making the card use higher bit depth if possible.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/SpaceServlet.java
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/ogoglio.js
maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/SpaceServlet.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/SpaceServlet.java 2008-01-30 22:43:10 UTC (rev 697)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/SpaceServlet.java 2008-01-30 22:43:45 UTC (rev 698)
@@ -109,7 +109,7 @@
}
public void doGet(HttpServletRequest request, HttpServletResponse response, String[] pathElements, AccountRecord authedAccount) throws PersistException, ServletException, IOException {
- ServiceDocument serviceDocument = new ServiceDocument(messageProxy.getUserCount(), messageProxy.getSimCount());
+ ServiceDocument serviceDocument = new ServiceDocument(messageProxy.getUserCount(), messageProxy.getSimCount(), request.getLocalAddr());
sendStringResponse(serviceDocument.toString(), "text/xml", response);
}
Modified: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/ogoglio.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/siteTemplates/ogoglio.js 2008-01-30 22:43:10 UTC (rev 697)
+++ maven/trunk/ogoglio-server/src/main/resources/siteTemplates/ogoglio.js 2008-01-30 22:43:45 UTC (rev 698)
@@ -631,6 +631,9 @@
}
// BEGIN SERVICE UTILS
+function requestService(listener){
+ new XMLRequestManager(appPath + "/space/", new BasicHTTPListener(listener)).send();
+}
function requestServiceState(listener){
new XMLRequestManager(appPath + "/space/state/", new BasicHTTPListener(listener)).send();
Modified: maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js 2008-01-30 22:43:10 UTC (rev 697)
+++ maven/trunk/ogoglio-server/src/main/resources/siteTemplates/spaceui.js 2008-01-30 22:43:45 UTC (rev 698)
@@ -89,12 +89,22 @@
spaceDiv.innerHTML = "No cookie. Please sign in or register as a guest.";
return;
}
+ requestService(handleService);
+}
+function handleService(serviceXML){
+ if(serviceXML == null){
+ spaceDiv.innerHTML = "There was an error and I could not talk to the server. Sorry.";
+ return;
+ }
+ var loginCookie = getLoginCookie();
+ var serverIP = serviceXML.getAttribute("serverip"); //we pass this in because Firefox and Applets on XP can resolve different IPs using load balanced DNS
var serviceURI = getServiceURI();
var html = "<applet id='viewer' archive='ogoglio-common.jar,ogoglio-viewer-applet.jar' codebase='" + serviceURI + "' code='com.ogoglio.viewer.applet.ViewerApplet' width='" + viewerWidth + "' height='" + viewerHeight + "' mayscript='true'>";
html += "<param name='loginCookie' value='" + loginCookie + "' />";
html += "<param name='serviceURI' value='" + serviceURI + "' />";
+ html += "<param name='serverIP' value='" + serverIP + "' />";
html += "<param name='spaceID' value='" + locationParameters['spaceID'] + "' />";
html += "<param name='image' value='" + appletLoadingImagePath + "' />";
if(viewerHelpMessage != null){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|