Index: /pom.xml
===================================================================
--- /pom.xml	(revision 35)
+++ /pom.xml	(revision 36)
@@ -6,5 +6,5 @@
 	<artifactId>partiesserver</artifactId>
 	<packaging>war</packaging>
-	<version>2.0.4</version> <!-- must equal ${geniusweb.version} -->
+	<version>2.0.5</version> <!-- must equal ${geniusweb.version} -->
 	<name>partiesserver Maven Webapp</name>
 	<url>http://maven.apache.org</url>
@@ -18,6 +18,6 @@
 		<jackson-2-version>2.12.3</jackson-2-version>
 		<!-- <tomcat.version>8.0.53</tomcat.version> -->
-		<tomcat.version>8.5.34</tomcat.version>
-		<geniusweb.version>2.0.4</geniusweb.version>
+		<tomcat.version>8.5.73</tomcat.version>
+		<geniusweb.version>${project.version}</geniusweb.version>
 	</properties>
 
Index: /src/main/java/geniusweb/partiesserver/repository/RunningPartiesRepo.java
===================================================================
--- /src/main/java/geniusweb/partiesserver/repository/RunningPartiesRepo.java	(revision 35)
+++ /src/main/java/geniusweb/partiesserver/repository/RunningPartiesRepo.java	(revision 36)
@@ -24,5 +24,5 @@
 	 * List of currently running parties.
 	 */
-	public static final int MAX_SLOTS = 8;
+	public static final int MAX_SLOTS = 16;
 	private static final RunningPartiesRepo instance = new RunningPartiesRepo(
 			new ReportToLogger("partiesserver"));
@@ -67,4 +67,5 @@
 			if (availableSlots() <= 0) {
 				Date date = estimateCleanupTime();
+				System.out.println("AAGHG!!" + runningParties.size());
 				throw new NoResourcesNowException(
 						"There are currently no free slots to register party "
Index: /src/main/java/geniusweb/partiesserver/websocket/PartySocket.java
===================================================================
--- /src/main/java/geniusweb/partiesserver/websocket/PartySocket.java	(revision 35)
+++ /src/main/java/geniusweb/partiesserver/websocket/PartySocket.java	(revision 36)
@@ -42,5 +42,4 @@
 @ServerEndpoint("/party/{party}")
 public class PartySocket implements ConnectionEnd<Inform, Action> {
-	private static final int MAX_MESSAGE_SIZE = 20 * 1024 * 1024;
 
 	private final Reporter log;
@@ -57,4 +56,6 @@
 	private SendBuffer outstream;
 	private Throwable error = null;
+
+	private StringBuffer buffer = new StringBuffer();
 
 	public PartySocket() {
@@ -75,6 +76,4 @@
 			throw new IllegalArgumentException("party can't be null");
 		}
-		session.setMaxTextMessageBufferSize(MAX_MESSAGE_SIZE);
-		session.setMaxBinaryMessageBufferSize(MAX_MESSAGE_SIZE);
 
 		this.session = session;
@@ -121,4 +120,7 @@
 	 * @param informmessage the incoming string, supposedly a JSON-fornatted
 	 *                      {@link Inform}
+	 * @param last          true if this is the last part of the incoming
+	 *                      message. We queue these manually here, to avoid
+	 *                      pre-allocating a fixed, very large memory block.
 	 * @param session       the session. We already have this info.
 	 * @throws IOException if there is a socket/connection error, we can't parse
@@ -126,5 +128,5 @@
 	 */
 	@OnMessage
-	public void onMessage(String informmessage, Session session)
+	public void onMessage(String informpart, boolean islast, Session session)
 			throws IOException {
 		if (this.session != session) {
@@ -135,4 +137,13 @@
 					+ " is still busy with previous message");
 		}
+		buffer.append(informpart);
+		if (!islast)
+			return;
+
+		String informmessage = buffer.toString();
+		buffer = new StringBuffer();
+
+		// if we get here, full message is now in
+
 		Inform info = Jackson.instance().readValue(informmessage, Inform.class);
 		RunningParty party = runningparties.get(partyID);
@@ -219,6 +230,5 @@
 		if (t instanceof EOFException) {
 			// This is a standard exception from Apache when a socket closes.
-			// Just ignore
-			// it...
+			// Just ignore it...
 			log.log(Level.FINEST,
 					"apache reported EOF from (probably closed) socket, ignoring");
Index: /src/test/java/geniusweb/partiesserver/AvailablePartiesUpdaterTest.java
===================================================================
--- /src/test/java/geniusweb/partiesserver/AvailablePartiesUpdaterTest.java	(revision 35)
+++ /src/test/java/geniusweb/partiesserver/AvailablePartiesUpdaterTest.java	(revision 36)
@@ -31,5 +31,5 @@
 
 public class AvailablePartiesUpdaterTest {
-	private static final String RANDOMPARTY = "src/main/webapp/partiesrepo/randomparty-2.0.4.jar";
+	private static final String RANDOMPARTY = "src/main/webapp/partiesrepo/randomparty-2.0.5.jar";
 	private static final int TESTRATE = 200; // check file changes every 200ms
 	@SuppressWarnings("unchecked")
Index: /src/test/java/geniusweb/partiesserver/EmbeddedTomcat.java
===================================================================
--- /src/test/java/geniusweb/partiesserver/EmbeddedTomcat.java	(revision 35)
+++ /src/test/java/geniusweb/partiesserver/EmbeddedTomcat.java	(revision 36)
@@ -11,5 +11,6 @@
 	public void start() {
 		try {
-			// If I don't want to copy files around then the base directory must be '.'
+			// If I don't want to copy files around then the base directory must
+			// be '.'
 			String baseDir = ".";
 			tomcat.setPort(8080);
@@ -29,21 +30,33 @@
 			tomcat.destroy();
 			// Tomcat creates a work folder where the temporary files are stored
-			// FileUtils.deleteDirectory(new File("work"));
 		} catch (LifecycleException e) {
 			throw new RuntimeException(e);
-//		} catch (IOException e) {
-//			throw new RuntimeException(e);
 		}
 	}
 
+	/**
+	 * Deploys the webapp contained in this project
+	 * 
+	 * @param appName the name to use on the server
+	 */
 	public void deploy(String appName) {
-		// tomcat.addWebapp(tomcat.getHost(), "/" + appName, new
-		// File("src/main/webapp").getAbsolutePath());
-		tomcat.addWebapp(tomcat.getHost(), "/" + appName, new File("src/main/webapp").getAbsolutePath());
+		deployWar(appName, new File("src/main/webapp"));
+	}
+
+	/**
+	 * Deploys the webapp in the given war
+	 * 
+	 * @param appName the name to use on the server
+	 * @param warfile the warfile to deploy. Should include ".war" extension.
+	 */
+	public void deployWar(String appName, File warfile) {
+		tomcat.addWebapp(tomcat.getHost(), "/" + appName,
+				warfile.getAbsolutePath());
+
 	}
 
 	public String getApplicationUrl(String appName) {
-		return String.format("http://%s:%d/%s", tomcat.getHost().getName(), tomcat.getConnector().getLocalPort(),
-				appName);
+		return String.format("http://%s:%d/%s", tomcat.getHost().getName(),
+				tomcat.getConnector().getLocalPort(), appName);
 	}
 }
Index: /src/test/java/geniusweb/partiesserver/JavaClientTest.java
===================================================================
--- /src/test/java/geniusweb/partiesserver/JavaClientTest.java	(revision 35)
+++ /src/test/java/geniusweb/partiesserver/JavaClientTest.java	(revision 36)
@@ -39,5 +39,5 @@
  */
 public class JavaClientTest {
-	private static final String RANDOMPARTY = "http://localhost:8080/partiesserver/run/randomparty-2.0.4";
+	private static final String RANDOMPARTY = "http://localhost:8080/partiesserver/run/randomparty-2.0.5";
 	private EmbeddedTomcat tomcat = new EmbeddedTomcat();
 	private JavaClient client = new JavaClient();
Index: /src/test/java/geniusweb/partiesserver/websocket/PartySocketTest.java
===================================================================
--- /src/test/java/geniusweb/partiesserver/websocket/PartySocketTest.java	(revision 35)
+++ /src/test/java/geniusweb/partiesserver/websocket/PartySocketTest.java	(revision 36)
@@ -119,5 +119,5 @@
 
 		Inform info = new YourTurn();
-		socket.onMessage(jackson.writeValueAsString(info), session);
+		socket.onMessage(jackson.writeValueAsString(info), true,session);
 		// check that party.inform was actually called with YourTurn
 		verify(runningparty1, times(1)).inform(argument.capture());
