Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/WeblogParser.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/WeblogParser.java	(revision 223)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/WeblogParser.java	(revision 224)
@@ -45,4 +45,12 @@
 	/**
 	 * <p>
+	 * Maximal length of a session. All longer sessions will be prunde. Default:
+	 * 100
+	 * </p>
+	 */
+	private int maxLength = 100;
+
+	/**
+	 * <p>
 	 * Collection of generated sequences.
 	 * </p>
@@ -121,4 +129,17 @@
 	public void setMinLength(int minLength) {
 		this.minLength = minLength;
+	}
+
+	/**
+	 * <p>
+	 * Sets the maximal length of a session. All sessions that contain more
+	 * events will be pruned.
+	 * </p>
+	 * 
+	 * @param maxLength
+	 *            new maximal length
+	 */
+	public void setMaxLength(int maxLength) {
+		this.maxLength = maxLength;
 	}
 
@@ -181,8 +202,8 @@
 					String path = uri.getPath();
 					List<String> getVars = extractGetVarsFromUri(uri);
-	
+
 					WebEvent event = new WebEvent(path, timestamp, postedVars,
 							getVars);
-	
+
 					// find session and add event
 					List<Integer> sessionIds = cookieSessionMap.get(cookie);
@@ -196,5 +217,6 @@
 					Integer lastSessionIndex = sessionIds
 							.get(sessionIds.size() - 1);
-					List<WebEvent> lastSession = sequences.get(lastSessionIndex);
+					List<WebEvent> lastSession = sequences
+							.get(lastSessionIndex);
 					long lastEventTime = timestamp;
 					if (!lastSession.isEmpty()) {
@@ -211,9 +233,10 @@
 					}
 				} catch (URISyntaxException e) {
-					Console.traceln("Ignored line " + lineCounter + ": " + e.getMessage());
+					Console.traceln("Ignored line " + lineCounter + ": "
+							+ e.getMessage());
 				}
 			}
 		}
-		pruneShortSequences();
+		pruneSequences();
 	}
 
@@ -223,10 +246,11 @@
 	 * </p>
 	 */
-	private void pruneShortSequences() {
+	private void pruneSequences() {
 		Console.traceln("" + sequences.size() + " user sequences found");
-		// prune sequences shorter than min-length
+		// prune sequences shorter than min-length and longer than maxLength
 		int i = 0;
 		while (i < sequences.size()) {
-			if (sequences.get(i).size() < minLength) {
+			if ((sequences.get(i).size() < minLength)
+					|| sequences.get(i).size() > maxLength) {
 				sequences.remove(i);
 			} else {
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/commands/CMDloadSessionsFromClickstream.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/commands/CMDloadSessionsFromClickstream.java	(revision 223)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/commands/CMDloadSessionsFromClickstream.java	(revision 224)
@@ -33,13 +33,12 @@
 		}
 		String source = (String) parameters.get(0);
+		String sequencesName = (String) parameters.get(1);
 		int timeout = -1;
 		int minLength = -1;
-		String sequencesName = "sequences";
-		if (parameters.size() >= 3) {
-			timeout = Integer.parseInt((String) parameters.get(1));
-			minLength = Integer.parseInt((String) parameters.get(2));
-		}
+		int maxLength = -1;
 		if (parameters.size() >= 4) {
-			sequencesName = (String) parameters.get(3);
+			timeout = Integer.parseInt((String) parameters.get(2));
+			minLength = Integer.parseInt((String) parameters.get(3));
+			maxLength = Integer.parseInt((String) parameters.get(4));
 		}
 
@@ -48,4 +47,5 @@
 			parser.setTimeout(timeout);
 			parser.setMinLength(minLength);
+			parser.setMaxLength(maxLength);
 		}
 		try {
@@ -73,5 +73,5 @@
 	@Override
 	public void help() {
-		Console.println("Usage: loadSessionsFromClickstream <filename> {<timeout> <minSessionLength>} {<sequencesName>}");
+		Console.println("Usage: loadSessionsFromClickstream <filename> <sequencesName> {<timeout> <minSessionLength> <maxSessionLength>}");
 	}
 
