You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by pa...@apache.org on 2013/11/26 09:09:32 UTC

[1/4] git commit: Upgrade atmosphere to 2.0.4 and js to 2.0.8

Updated Branches:
  refs/heads/wicket-6.x 6189a89d0 -> 3239c8d00


Upgrade atmosphere to 2.0.4 and js to 2.0.8


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/3239c8d0
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/3239c8d0
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/3239c8d0

Branch: refs/heads/wicket-6.x
Commit: 3239c8d0096045c3d3faeab724ec9b4769e829aa
Parents: 4e161cb
Author: Emond Papegaaij <em...@topicus.nl>
Authored: Tue Nov 26 09:08:59 2013 +0100
Committer: Emond Papegaaij <em...@topicus.nl>
Committed: Tue Nov 26 09:09:16 2013 +0100

----------------------------------------------------------------------
 wicket-experimental/wicket-atmosphere/pom.xml   |   2 +-
 .../wicket/atmosphere/jquery.atmosphere.js      | 134 ++++++++++++++-----
 2 files changed, 99 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/3239c8d0/wicket-experimental/wicket-atmosphere/pom.xml
----------------------------------------------------------------------
diff --git a/wicket-experimental/wicket-atmosphere/pom.xml b/wicket-experimental/wicket-atmosphere/pom.xml
index 2be87d5..fb412e7 100644
--- a/wicket-experimental/wicket-atmosphere/pom.xml
+++ b/wicket-experimental/wicket-atmosphere/pom.xml
@@ -27,7 +27,7 @@
 	<version>0.16-SNAPSHOT</version>
 	<packaging>jar</packaging>
 	<properties>
-		<atmosphere.version>2.0.0</atmosphere.version>
+		<atmosphere.version>2.0.4</atmosphere.version>
 	</properties>
 	<name>Wicket-Atmosphere</name>
 	<description>Wicket-Atmosphere provides integration of the Atmosphere Framework in Wicket.</description>

http://git-wip-us.apache.org/repos/asf/wicket/blob/3239c8d0/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/jquery.atmosphere.js
----------------------------------------------------------------------
diff --git a/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/jquery.atmosphere.js b/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/jquery.atmosphere.js
index b909609..701a586 100644
--- a/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/jquery.atmosphere.js
+++ b/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/jquery.atmosphere.js
@@ -1,5 +1,5 @@
 /**
- * Copyright 2012 Jeanfrancois Arcand
+ * Copyright 2013 Jeanfrancois Arcand
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -54,7 +54,8 @@ jQuery.atmosphere = function () {
     };
 
     return {
-        version: "2.0.3-jquery",
+        version: "2.0.8-jquery",
+        uuid : 0,
         requests: [],
         callbacks: [],
 
@@ -166,7 +167,7 @@ jQuery.atmosphere = function () {
                 request: null,
                 partialMessage: "",
                 errorHandled: false,
-                id: 0
+                closedByClientTimeout: false
             };
 
             /**
@@ -256,6 +257,9 @@ jQuery.atmosphere = function () {
             /** Trace time */
             var _traceTimer;
 
+            /** Key for connection sharing */
+            var _sharingKey;
+
             // Automatic call to subscribe
             _subscribe(options);
 
@@ -352,9 +356,11 @@ jQuery.atmosphere = function () {
                 }
 
                 // Protocol
-                _request.firstMessage = true;
+                _request.firstMessage = jQuery.atmosphere.uuid == 0 ? true : false;
                 _request.isOpen = false;
                 _request.ctime = jQuery.now();
+                _request.uuid = jQuery.atmosphere.uuid;
+                _request.closedByClientTimeout = false;
 
                 if (_request.transport !== 'websocket' && _request.transport !== 'sse') {
                     _executeRequest(_request);
@@ -679,13 +685,13 @@ jQuery.atmosphere = function () {
                 };
 
                 function leaveTrace() {
-                    document.cookie = encodeURIComponent(name) + "=" +
+                    document.cookie = _sharingKey + "=" +
                         // Opera's JSON implementation ignores a number whose a last digit of 0 strangely
                         // but has no problem with a number whose a last digit of 9 + 1
                         encodeURIComponent(jQuery.stringifyJSON({
                             ts: jQuery.now() + 1,
                             heir: (storageService.get("children") || [])[0]
-                        }));
+                        })) + "; path=/";
                 }
 
                 // Chooses a storageService
@@ -704,6 +710,7 @@ jQuery.atmosphere = function () {
                     storageService.set("opened", false);
                 }
                 // Leaves traces
+                _sharingKey = encodeURIComponent(name);
                 leaveTrace();
                 _traceTimer = setInterval(leaveTrace, 1000);
 
@@ -780,8 +787,17 @@ jQuery.atmosphere = function () {
                     dataType: "jsonp",
                     error: function (jqXHR, textStatus, errorThrown) {
                         _response.error = true;
-                        if (jqXHR.status < 300) {
-                            _reconnect(_jqxhr, rq, 0);
+
+                        if (rq.openId) {
+                            clearTimeout(rq.openId);
+                        }
+
+                        if (rq.reconnect && _requestCount++ < rq.maxReconnectOnClose) {
+                            _open('re-connecting', rq.transport, rq);
+                            _reconnect(_jqxhr, rq, rq.reconnectInterval);
+                            rq.openId = setTimeout(function() {
+                                _triggerOpen(rq);
+                            }, rq.reconnectInterval + 1000);
                         } else {
                             _onError(jqXHR.status, errorThrown);
                         }
@@ -994,6 +1010,9 @@ jQuery.atmosphere = function () {
                         } else {
                             _open('re-opening', "sse", _request);
                         }
+                    } else if (_request.isReopen) {
+                        _request.isReopen = false;
+                        _open('re-opening', _request.transport, _request);
                     }
                     sseOpened = true;
 
@@ -1025,7 +1044,7 @@ jQuery.atmosphere = function () {
                 _sse.onerror = function (message) {
                     clearTimeout(_request.id);
 
-                    if (_response.state === 'closedByClient') return;
+                    if (_response.closedByClientTimeout) return;
 
                     _invokeClose(sseOpened);
                     _clearState();
@@ -1038,7 +1057,7 @@ jQuery.atmosphere = function () {
                         if (_requestCount++ < _request.maxReconnectOnClose) {
                             _open('re-connecting', _request.transport, _request);
                             if (_request.reconnectInterval > 0) {
-                                _request.id = setTimeout(function () {
+                                _request.reconnectId = setTimeout(function () {
                                     _executeSSE(true);
                                 }, _request.reconnectInterval);
                             } else {
@@ -1113,18 +1132,22 @@ jQuery.atmosphere = function () {
                         jQuery.atmosphere.debug("Websocket successfully opened");
                     }
 
+                    var reopening = webSocketOpened;
+
+                    webSocketOpened = true;
+                    if(_websocket != null) {
+                        _websocket.webSocketOpened = webSocketOpened;
+                    }
+
                     if (!_request.enableProtocol) {
-                        if (!webSocketOpened) {
-                            _open('opening', "websocket", _request);
-                        } else {
+                        if (reopening) {
                             _open('re-opening', "websocket", _request);
+                        } else {
+                            _open('opening', "websocket", _request);
                         }
                     }
 
-                    webSocketOpened = true;
                     if (_websocket != null) {
-                        _websocket.webSocketOpened = webSocketOpened;
-
                         if (_request.method === 'POST') {
                             _response.state = "messageReceived";
                             _websocket.send(_request.data);
@@ -1200,7 +1223,7 @@ jQuery.atmosphere = function () {
                         jQuery.atmosphere.warn("Websocket closed, wasClean: " + message.wasClean);
                     }
 
-                    if (_response.state === 'closedByClient') {
+                    if (_response.closedByClientTimeout) {
                         return;
                     }
 
@@ -1218,7 +1241,7 @@ jQuery.atmosphere = function () {
                         if (_requestCount++ < _request.maxReconnectOnClose) {
                             _open('re-connecting', _request.transport, _request);
                             if (_request.reconnectInterval > 0) {
-                                _request.id = setTimeout(function () {
+                                _request.reconnectId = setTimeout(function () {
                                     _response.responseBody = "";
                                     _response.messages = [];
                                     _executeWebSocket(true);
@@ -1250,6 +1273,9 @@ jQuery.atmosphere = function () {
             function _handleProtocol(request, message) {
                 // The first messages is always the uuid.
                 var b = true;
+
+                if (request.transport === 'polling') return b;
+
                 if (jQuery.trim(message).length !== 0 && request.enableProtocol && request.firstMessage) {
                     request.firstMessage = false;
                     var messages = message.split(request.messageDelimiter);
@@ -1260,6 +1286,8 @@ jQuery.atmosphere = function () {
                     if (request.transport !== 'long-polling') {
                         _triggerOpen(request);
                     }
+
+                    jQuery.atmosphere.uuid = request.uuid;
                 } else if (request.enableProtocol && request.firstMessage) {
                     // In case we are getting some junk from IE
                     b = false;
@@ -1281,6 +1309,7 @@ jQuery.atmosphere = function () {
             }
 
             function _onClientTimeout(_request) {
+                _response.closedByClientTimeout = true;
                 _response.state = 'closedByClient';
                 _response.responseBody = "";
                 _response.status = 408;
@@ -1307,7 +1336,7 @@ jQuery.atmosphere = function () {
              * @param response
              */
             function _trackMessageSize(message, request, response) {
-                if (!_handleProtocol(_request, message))
+                if (!_handleProtocol(request, message))
                     return true;
                 if (message.length === 0)
                     return true;
@@ -1376,7 +1405,7 @@ jQuery.atmosphere = function () {
                     _response.transport = _request.fallbackTransport;
                     _request.fallbackTransport = 'none';
                     if (reconnectInterval > 0) {
-                        _request.id = setTimeout(function () {
+                        _request.reconnectId = setTimeout(function () {
                             _execute();
                         }, reconnectInterval);
                     } else {
@@ -1537,8 +1566,8 @@ jQuery.atmosphere = function () {
                             if (!_response.status) {
                                 _response.status = 500;
                             }
-                            _clearState();
                             if (!_response.errorHandled) {
+                                _clearState();
                                 reconnectF();
                             }
                         };
@@ -1569,12 +1598,9 @@ jQuery.atmosphere = function () {
                         _timeout(_request);
 
                         if (rq.transport !== 'polling') {
-                            if ((!rq.enableProtocol || !request.firstMessage) && ajaxRequest.readyState === 2) {
-                                _triggerOpen(rq);
-                            }
                             // MSIE 9 and lower status can be higher than 1000, Chrome can be 0
                             var status = 200;
-                            if (ajaxRequest.readyState > 1) {
+                            if (ajaxRequest.readyState === 4) {
                                 status = ajaxRequest.status > 1000 ? 0 : ajaxRequest.status;
                             }
 
@@ -1585,6 +1611,13 @@ jQuery.atmosphere = function () {
                                 reconnectF();
                                 return;
                             }
+                            
+                            // Firefox incorrectly send statechange 0->2 when a reconnect attempt fails. The above checks ensure that onopen is not called for these
+                            if ((!rq.enableProtocol || !request.firstMessage) && ajaxRequest.readyState === 2) {
+                                _triggerOpen(rq);
+                            }
+                        } else if (ajaxRequest.readyState === 4) {
+                            update = true;
                         }
 
                         if (update) {
@@ -1662,7 +1695,7 @@ jQuery.atmosphere = function () {
                                 _response.state = "messagePublished";
                             }
 
-                            var isAllowedToReconnect = request.transport !== 'streaming';
+                            var isAllowedToReconnect = request.transport !== 'streaming' && request.transport !== 'polling';;
                             if (isAllowedToReconnect && !rq.executeCallbackBeforeReconnect) {
                                 _reconnect(ajaxRequest, rq, 0);
                             }
@@ -1760,9 +1793,13 @@ jQuery.atmosphere = function () {
 
                     // Reconnect immedialtely
                     clearTimeout(request.id);
+                    if (request.reconnectId) {
+                        clearTimeout(request.reconnectId);
+                    }
+
                     if (reconnectInterval > 0) {
-                        request.id = setTimeout(function () {
-                            _executeRequest(request);
+                        setTimeout(function () {
+                            _request.reconnectId = _executeRequest(request);
                         }, reconnectInterval);
                     } else {
                         _executeRequest(request);
@@ -1827,7 +1864,7 @@ jQuery.atmosphere = function () {
                         _clearState();
                         if (_requestCount++ < rq.maxReconnectOnClose) {
                             if (rq.reconnectInterval > 0) {
-                                rq.id = setTimeout(function () {
+                                rq.reconnectId = setTimeout(function () {
                                     _open('re-connecting', request.transport, request);
                                     _ieXDR(rq);
                                 }, rq.reconnectInterval);
@@ -2024,7 +2061,7 @@ jQuery.atmosphere = function () {
                                         _invokeClose(true);
                                         _open('re-connecting', rq.transport, rq);
                                         if (rq.reconnectInterval > 0) {
-                                            rq.id = setTimeout(function () {
+                                            rq.reconnectId = setTimeout(function () {
                                                 _ieStreaming(rq);
                                             }, rq.reconnectInterval);
                                         } else {
@@ -2040,7 +2077,7 @@ jQuery.atmosphere = function () {
                                 _open('re-connecting', rq.transport, rq);
                                 if (_requestCount++ < rq.maxReconnectOnClose) {
                                     if (rq.reconnectInterval > 0) {
-                                        rq.id = setTimeout(function () {
+                                        rq.reconnectId = setTimeout(function () {
                                             _ieStreaming(rq);
                                         }, rq.reconnectInterval);
                                     } else {
@@ -2086,6 +2123,9 @@ jQuery.atmosphere = function () {
                     _pushJsonp(message);
                 } else if (_websocket != null) {
                     _pushWebSocket(message);
+                } else {
+                    _onError(0, "No suspended connection available");
+                    jQuery.atmosphere.error("No suspended connection available. Make sure atmosphere.subscribe has been called and request.onOpen invoked before invoking this method");
                 }
             }
 
@@ -2214,7 +2254,7 @@ jQuery.atmosphere = function () {
              *
              */
             function _pushWebSocket(message) {
-                var msg = _getStringMessage(message);
+                var msg = jQuery.atmosphere.isBinary(message) ? message : _getStringMessage(message);
                 var data;
                 try {
                     if (_request.dispatchUrl != null) {
@@ -2310,6 +2350,7 @@ jQuery.atmosphere = function () {
                             f.onError(response);
                         break;
                     case "opening":
+                        delete _request.closed;
                         if (typeof (f.onOpen) !== 'undefined')
                             f.onOpen(response);
                         break;
@@ -2326,6 +2367,7 @@ jQuery.atmosphere = function () {
                             f.onClientTimeout(_request);
                         break;
                     case "re-opening":
+                        delete _request.closed;
                         if (typeof (f.onReopen) !== 'undefined')
                             f.onReopen(_request, response);
                         break;
@@ -2453,13 +2495,15 @@ jQuery.atmosphere = function () {
                     if (_request.connectTimeout > 0) {
                         jQuery.ajax({
                             url: url,
-                            async: false,
-                            timeout: _request.connectTimeout
+                            async: true,
+                            timeout: _request.connectTimeout,
+                            cache: false
                         });
                     } else {
                         jQuery.ajax({
                             url: url,
-                            async: false
+                            async: true,
+                            cache: false
                         });
                     }
                 }
@@ -2471,6 +2515,9 @@ jQuery.atmosphere = function () {
              * @private
              */
             function _close() {
+                if (_request.reconnectId) {
+                    clearTimeout(_request.reconnectId);
+                }
                 _request.reconnect = false;
                 _abordingConnection = true;
                 _response.request = _request;
@@ -2520,7 +2567,7 @@ jQuery.atmosphere = function () {
                     // Clears trace timer
                     clearInterval(_traceTimer);
                     // Removes the trace
-                    document.cookie = encodeURIComponent("atmosphere-" + _request.url) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT";
+                    document.cookie = _sharingKey + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";
                     // The heir is the parent unless unloading
                     _storageService.signal("close", {
                         reason: "",
@@ -2667,6 +2714,15 @@ jQuery.atmosphere = function () {
                 return true;
             }
 
+            // KreaTV 4.1 -> 4.4
+            else if (jQuery.trim(navigator.userAgent).slice(0, 16) === "KreaTVWebKit/531") {
+                return true;
+            }
+            // KreaTV 3.8
+            else if (jQuery.trim(navigator.userAgent).slice(-7).toLowerCase() === "kreatel") {
+                return true;
+            }
+
             // Force Android to use CORS as some version like 2.2.3 fail otherwise
             var ua = navigator.userAgent.toLowerCase();
             var isAndroid = ua.indexOf("android") > -1;
@@ -2759,6 +2815,12 @@ jQuery.atmosphere = function () {
 
         error: function () {
             jQuery.atmosphere.log('error', arguments);
+        },
+
+        // TODO extract to utils or something
+        isBinary: function (data) {
+            // True if data is an instance of Blob, ArrayBuffer or ArrayBufferView 
+            return /^\[object\s(?:Blob|ArrayBuffer|.+Array)\]$/.test(Object.prototype.toString.call(data));
         }
     };
 }();


[2/4] git commit: Updated the cdi example to wicket-cdi-1.1

Posted by pa...@apache.org.
Updated the cdi example to wicket-cdi-1.1


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/a742c6e5
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/a742c6e5
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/a742c6e5

Branch: refs/heads/wicket-6.x
Commit: a742c6e598f54b31c5cdfdf4be98ca14397a54f8
Parents: 5133c75
Author: Emond Papegaaij <em...@topicus.nl>
Authored: Tue Nov 26 07:51:10 2013 +0100
Committer: Emond Papegaaij <em...@topicus.nl>
Committed: Tue Nov 26 09:09:16 2013 +0100

----------------------------------------------------------------------
 pom.xml                                         | 37 +++++++++++++
 wicket-examples/pom.xml                         | 46 ++--------------
 wicket-examples/src/main/java/log4j.properties  |  1 +
 .../examples/cdi/AutoConversationPage1.html     | 19 +++++++
 .../examples/cdi/AutoConversationPage1.java     | 57 ++++++++++++++++++++
 .../examples/cdi/AutoConversationPage2.html     | 17 ++++++
 .../examples/cdi/AutoConversationPage2.java     | 43 +++++++++++++++
 .../wicket/examples/cdi/CdiApplication.java     |  6 +--
 .../apache/wicket/examples/cdi/CdiHomePage.html |  3 ++
 9 files changed, 181 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/a742c6e5/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 55ea42b..44ae648 100644
--- a/pom.xml
+++ b/pom.xml
@@ -341,6 +341,11 @@
 				<version>0.15-SNAPSHOT</version>
 			</dependency>
 			<dependency>
+				<groupId>org.apache.wicket</groupId>
+				<artifactId>wicket-cdi-1.1</artifactId>
+				<version>0.2-SNAPSHOT</version>
+			</dependency>
+			<dependency>
 				<groupId>junit</groupId>
 				<artifactId>junit</artifactId>
 				<version>4.10</version>
@@ -860,6 +865,38 @@
 						</execution>
 					</executions>
 				</plugin>
+				
+				<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+				<plugin>
+					<groupId>org.eclipse.m2e</groupId>
+					<artifactId>lifecycle-mapping</artifactId>
+					<version>1.0.0</version>
+					<configuration>
+						<lifecycleMappingMetadata>
+							<pluginExecutions>
+								<pluginExecution>
+									<pluginExecutionFilter>
+										<groupId>
+											org.apache.felix
+										</groupId>
+										<artifactId>
+											maven-bundle-plugin
+										</artifactId>
+										<versionRange>
+											[2.3.7,)
+										</versionRange>
+										<goals>
+											<goal>manifest</goal>
+										</goals>
+									</pluginExecutionFilter>
+									<action>
+										<ignore />
+									</action>
+								</pluginExecution>
+							</pluginExecutions>
+						</lifecycleMappingMetadata>
+					</configuration>
+				</plugin>
 			</plugins>
 		</pluginManagement>
 	</build>

http://git-wip-us.apache.org/repos/asf/wicket/blob/a742c6e5/wicket-examples/pom.xml
----------------------------------------------------------------------
diff --git a/wicket-examples/pom.xml b/wicket-examples/pom.xml
index 07747fb..0763a80 100644
--- a/wicket-examples/pom.xml
+++ b/wicket-examples/pom.xml
@@ -124,21 +124,16 @@
 		<dependency>
 			<groupId>org.jboss.weld</groupId>
 			<artifactId>weld-core</artifactId>
-			<version>1.1.9.Final</version>
+			<version>2.1.0.Final</version>
 		</dependency>
 		<dependency>
 			<groupId>org.jboss.weld.servlet</groupId>
 			<artifactId>weld-servlet-core</artifactId>
-			<version>1.1.9.Final</version>
-		</dependency>
-		<dependency>
-			<groupId>org.jboss.seam.conversation</groupId>
-			<artifactId>seam-conversation-weld</artifactId>
-			<version>3.0.0.Final</version>
+			<version>2.1.0.Final</version>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.wicket</groupId>
-			<artifactId>wicket-cdi</artifactId>
+			<artifactId>wicket-cdi-1.1</artifactId>
 		</dependency>
 		<dependency>
 			<groupId>javax.el</groupId>
@@ -216,40 +211,5 @@
 				<artifactId>jetty-maven-plugin</artifactId>
 			</plugin>
 		</plugins>
-		<pluginManagement>
-			<plugins>
-				<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
-				<plugin>
-					<groupId>org.eclipse.m2e</groupId>
-					<artifactId>lifecycle-mapping</artifactId>
-					<version>1.0.0</version>
-					<configuration>
-						<lifecycleMappingMetadata>
-							<pluginExecutions>
-								<pluginExecution>
-									<pluginExecutionFilter>
-										<groupId>
-											org.apache.felix
-										</groupId>
-										<artifactId>
-											maven-bundle-plugin
-										</artifactId>
-										<versionRange>
-											[2.3.7,)
-										</versionRange>
-										<goals>
-											<goal>manifest</goal>
-										</goals>
-									</pluginExecutionFilter>
-									<action>
-										<ignore />
-									</action>
-								</pluginExecution>
-							</pluginExecutions>
-						</lifecycleMappingMetadata>
-					</configuration>
-				</plugin>
-			</plugins>
-		</pluginManagement>
 	</build>
 </project>

http://git-wip-us.apache.org/repos/asf/wicket/blob/a742c6e5/wicket-examples/src/main/java/log4j.properties
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/log4j.properties b/wicket-examples/src/main/java/log4j.properties
index cde4162..7996b37 100644
--- a/wicket-examples/src/main/java/log4j.properties
+++ b/wicket-examples/src/main/java/log4j.properties
@@ -5,6 +5,7 @@ log4j.logger.org=INFO
 log4j.logger.com=INFO
 log4j.logger.net=INFO
 log4j.logger.nl=INFO
+log4j.logger.jndi=INFO
 
 log4j.logger.org.apache.wicket=WARN
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/a742c6e5/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/AutoConversationPage1.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/AutoConversationPage1.html b/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/AutoConversationPage1.html
new file mode 100644
index 0000000..6411b05
--- /dev/null
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/AutoConversationPage1.html
@@ -0,0 +1,19 @@
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+<body>
+<wicket:extend>
+	<p>
+		This page demonstrates automatic conversation managed. Below is a counter
+		that is conversation-scoped. Click increment a couple of times and then click
+		the 'Continue to next page', the counter value should persist on the
+		next page.
+	</p>
+	<p>
+		Current counter value is: <span wicket:id="count">100</span>
+		<a wicket:id="increment">increment</a>
+	</p>
+	<p>
+		<a wicket:id="next">Continue to next page</a>
+	</p>
+</wicket:extend>
+</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/a742c6e5/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/AutoConversationPage1.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/AutoConversationPage1.java b/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/AutoConversationPage1.java
new file mode 100644
index 0000000..2020638
--- /dev/null
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/AutoConversationPage1.java
@@ -0,0 +1,57 @@
+/*
+ * 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
+ *
+ * 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.
+ */
+package org.apache.wicket.examples.cdi;
+
+import javax.enterprise.context.Conversation;
+import javax.inject.Inject;
+
+import org.apache.wicket.cdi.ConversationalComponent;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.model.PropertyModel;
+
+public class AutoConversationPage1 extends CdiExamplePage implements ConversationalComponent
+{
+	@Inject
+	ConversationCounter counter;
+
+	@Inject
+	Conversation conversation;
+
+	public AutoConversationPage1()
+	{
+		add(new Label("count", new PropertyModel(this, "counter.count")));
+
+		add(new Link<Void>("increment")
+		{
+			@Override
+			public void onClick()
+			{
+				counter.increment();
+			}
+		});
+
+		add(new Link<Void>("next")
+		{
+			@Override
+			public void onClick()
+			{
+				setResponsePage(new AutoConversationPage2());
+			}
+		});
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/a742c6e5/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/AutoConversationPage2.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/AutoConversationPage2.html b/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/AutoConversationPage2.html
new file mode 100644
index 0000000..bb2d4e1
--- /dev/null
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/AutoConversationPage2.html
@@ -0,0 +1,17 @@
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+<body>
+<wicket:extend>
+	<p>
+		This page is not marked with ConversationalComponent. Therefore, the conversation that was
+		started on the previous page is ended. Notice the conversational counter injected into this
+		page initially has the same value as in the	previous page, this is because the conversation
+		was still active in the request that rendered this page. However, clicking 'refresh' below,
+		will reset the counter to 0.
+	</p>
+	<p>
+		Current counter value is: <span wicket:id="count">100</span>
+		<a wicket:id="refresh">refresh</a>
+	</p>
+</wicket:extend>
+</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/a742c6e5/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/AutoConversationPage2.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/AutoConversationPage2.java b/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/AutoConversationPage2.java
new file mode 100644
index 0000000..4f08401
--- /dev/null
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/AutoConversationPage2.java
@@ -0,0 +1,43 @@
+/*
+ * 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
+ *
+ * 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.
+ */
+package org.apache.wicket.examples.cdi;
+
+import javax.inject.Inject;
+
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.model.PropertyModel;
+
+public class AutoConversationPage2 extends CdiExamplePage
+{
+	@Inject
+	ConversationCounter counter;
+
+	public AutoConversationPage2()
+	{
+		add(new Label("count", new PropertyModel(this, "counter.count")));
+
+		add(new Link<Void>("refresh")
+		{
+			@Override
+			public void onClick()
+			{
+			}
+		});
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/a742c6e5/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/CdiApplication.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/CdiApplication.java b/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/CdiApplication.java
index 91ed38d..c56d2e7 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/CdiApplication.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/CdiApplication.java
@@ -37,12 +37,8 @@ public class CdiApplication extends WebApplication
 	{
 		super.init();
 
-		// lookup bean manager from Weld's servlet listener
-		BeanManager manager = (BeanManager)getServletContext().getAttribute(
-			Listener.BEAN_MANAGER_ATTRIBUTE_NAME);
-
 		// configure wicket/cdi
-		new CdiConfiguration(manager).configure(this);
+		new CdiConfiguration().configure(this);
 	}
 
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/a742c6e5/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/CdiHomePage.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/CdiHomePage.html b/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/CdiHomePage.html
index ef2431a..d750a11 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/CdiHomePage.html
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/cdi/CdiHomePage.html
@@ -9,6 +9,9 @@
 		<li>
 			<a href="ConversationPage1.html">Conversation Propagation Example</a>
 		</li>
+		<li>
+			<a href="AutoConversationPage1.html">Automatic Conversation Management Example</a>
+		</li>
 	</ul>
 	</wicket:link>
 </wicket:extend>


[4/4] git commit: Fixed auto conversations

Posted by pa...@apache.org.
Fixed auto conversations


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/5133c758
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/5133c758
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/5133c758

Branch: refs/heads/wicket-6.x
Commit: 5133c7587143d53d3228ddb77f28f21d64810dfe
Parents: 6189a89
Author: Emond Papegaaij <em...@topicus.nl>
Authored: Tue Nov 26 07:50:37 2013 +0100
Committer: Emond Papegaaij <em...@topicus.nl>
Committed: Tue Nov 26 09:09:16 2013 +0100

----------------------------------------------------------------------
 .../wicket/cdi/AutoConversationManager.java     | 120 +++++++++++++++++++
 .../org/apache/wicket/cdi/CdiConfiguration.java |   6 +-
 .../wicket/cdi/ConversationPropagator.java      |  81 +------------
 3 files changed, 128 insertions(+), 79 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/5133c758/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversationManager.java
----------------------------------------------------------------------
diff --git a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversationManager.java b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversationManager.java
new file mode 100644
index 0000000..5b88365
--- /dev/null
+++ b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversationManager.java
@@ -0,0 +1,120 @@
+/*
+ * 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
+ *
+ * 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.
+ */
+package org.apache.wicket.cdi;
+
+import javax.enterprise.context.Conversation;
+import javax.inject.Inject;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.Page;
+import org.apache.wicket.application.IComponentOnBeforeRenderListener;
+import org.apache.wicket.request.IRequestHandler;
+import org.apache.wicket.request.cycle.RequestCycle;
+import org.apache.wicket.util.visit.IVisit;
+import org.apache.wicket.util.visit.IVisitor;
+import org.apache.wicket.util.visit.Visits;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Automatically starts and ends conversations for pages with a
+ * {@link ConversationalComponent}.
+ * 
+ * @author papegaaij
+ */
+public class AutoConversationManager implements IComponentOnBeforeRenderListener
+{
+	private static final Logger logger = LoggerFactory.getLogger(AutoConversationManager.class);
+
+	@Inject
+	private Conversation conversation;
+
+	@Inject
+	private AutoConversation autoConversation;
+
+	private IConversationPropagation propagation;
+
+	public AutoConversationManager(IConversationPropagation propagation)
+	{
+		NonContextual.of(AutoConversationManager.class).inject(this);
+		this.propagation = propagation;
+	}
+
+	@Override
+	public void onBeforeRender(Component component)
+	{
+		if (component instanceof Page)
+		{
+			Page page = (Page)component;
+			autoEndIfNecessary(page, RequestCycle.get().getActiveRequestHandler());
+			autoBeginIfNecessary(page, RequestCycle.get().getActiveRequestHandler());
+		}
+	}
+
+	protected void autoBeginIfNecessary(Page page, IRequestHandler handler)
+	{
+		if (conversation == null || !conversation.isTransient() || page == null
+				|| !hasConversationalComponent(page) || !propagation.propagatesVia(handler, page))
+		{
+			return;
+		}
+
+		// auto activate conversation
+
+		conversation.begin();
+		autoConversation.setAutomatic(true);
+
+		logger.debug("Auto-began conversation {} for page {}", conversation.getId(), page);
+	}
+
+	protected void autoEndIfNecessary(Page page, IRequestHandler handler)
+	{
+		if (conversation == null || conversation.isTransient() || page == null
+				|| hasConversationalComponent(page) || !propagation.propagatesVia(handler, page)
+				|| autoConversation.isAutomatic() == false)
+		{
+			return;
+		}
+
+		// auto de-activate conversation
+
+		String cid = conversation.getId();
+
+		autoConversation.setAutomatic(false);
+		conversation.end();
+		ConversationPropagator.removeConversationIdFromPage(page);
+
+		logger.debug("Auto-ended conversation {} for page {}", cid, page);
+	}
+
+	protected boolean hasConversationalComponent(Page page)
+	{
+		Boolean hasConversational = Visits.visit(page, new IVisitor<Component, Boolean>()
+		{
+			@Override
+			public void component(Component object, IVisit<Boolean> visit)
+			{
+				if (object instanceof ConversationalComponent)
+				{
+					visit.stop(true);
+				}
+			}
+		});
+
+		return hasConversational == null ? false : hasConversational;
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/5133c758/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/CdiConfiguration.java
----------------------------------------------------------------------
diff --git a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/CdiConfiguration.java b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/CdiConfiguration.java
index 93675f7..37bfa33 100644
--- a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/CdiConfiguration.java
+++ b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/CdiConfiguration.java
@@ -33,7 +33,7 @@ public class CdiConfiguration
 		private static final long serialVersionUID = 1L;
 	};
 
-	private IConversationPropagation propagation = ConversationPropagation.ALL;
+	private IConversationPropagation propagation = ConversationPropagation.NONBOOKMARKABLE;
 
 	/**
 	 * Constructor
@@ -47,14 +47,12 @@ public class CdiConfiguration
 		return propagation;
 	}
 
-
 	public CdiConfiguration setPropagation(IConversationPropagation propagation)
 	{
 		this.propagation = propagation;
 		return this;
 	}
 
-
 	/**
 	 * Configures the specified application
 	 * 
@@ -77,6 +75,8 @@ public class CdiConfiguration
 		{
 			listeners.add(new ConversationPropagator(application, getPropagation()));
 			application.getComponentPreOnBeforeRenderListeners().add(
+					new AutoConversationManager(getPropagation()));
+			application.getComponentPreOnBeforeRenderListeners().add(
 					new ConversationExpiryChecker());
 		}
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/5133c758/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java
----------------------------------------------------------------------
diff --git a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java
index 9af8156..9bd0597 100644
--- a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java
+++ b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java
@@ -21,7 +21,6 @@ import javax.enterprise.context.ConversationScoped;
 import javax.inject.Inject;
 
 import org.apache.wicket.Application;
-import org.apache.wicket.Component;
 import org.apache.wicket.MetaDataKey;
 import org.apache.wicket.Page;
 import org.apache.wicket.core.request.handler.BufferedResponseRequestHandler;
@@ -37,9 +36,6 @@ import org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandle
 import org.apache.wicket.request.mapper.parameter.PageParameters;
 import org.apache.wicket.request.resource.PackageResourceReference;
 import org.apache.wicket.util.lang.Args;
-import org.apache.wicket.util.visit.IVisit;
-import org.apache.wicket.util.visit.IVisitor;
-import org.apache.wicket.util.visit.Visits;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -75,9 +71,6 @@ public class ConversationPropagator extends AbstractRequestCycleListener
 	@Inject
 	private Conversation conversation;
 
-	@Inject
-	private AutoConversation autoConversation;
-
 	/**
 	 * Constructor
 	 * 
@@ -129,22 +122,6 @@ public class ConversationPropagator extends AbstractRequestCycleListener
 	}
 
 	@Override
-	public void onRequestHandlerExecuted(RequestCycle cycle, IRequestHandler handler)
-	{
-		Page page = getPage(handler);
-
-		if (page == null)
-		{
-			return;
-		}
-
-		// apply auto semantics
-
-		autoEndIfNecessary(page, handler, conversation);
-		autoBeginIfNecessary(page, handler, conversation);
-	}
-
-	@Override
 	public void onRequestHandlerScheduled(RequestCycle cycle, IRequestHandler handler)
 	{
 		// propagate current non-transient conversation to the newly scheduled
@@ -237,59 +214,6 @@ public class ConversationPropagator extends AbstractRequestCycleListener
 		return true;
 	}
 
-	protected void autoBeginIfNecessary(Page page, IRequestHandler handler,
-			Conversation conversation)
-	{
-		if (conversation == null || !conversation.isTransient() || page == null
-				|| !hasConversationalComponent(page) || !propagation.propagatesVia(handler, page))
-		{
-			return;
-		}
-
-		// auto activate conversation
-
-		conversation.begin();
-		autoConversation.setAutomatic(true);
-
-		logger.debug("Auto-began conversation {} for page {}", conversation.getId(), page);
-	}
-
-	protected void autoEndIfNecessary(Page page, IRequestHandler handler, Conversation conversation)
-	{
-		if (conversation == null || conversation.isTransient() || page == null
-				|| hasConversationalComponent(page) || autoConversation.isAutomatic() == false)
-		{
-			return;
-		}
-
-		// auto de-activate conversation
-
-		String cid = conversation.getId();
-
-		autoConversation.setAutomatic(false);
-		conversation.end();
-
-		logger.debug("Auto-ended conversation {} for page {}", cid, page);
-	}
-
-
-	protected boolean hasConversationalComponent(Page page)
-	{
-		Boolean hasConversational = Visits.visit(page, new IVisitor<Component, Boolean>()
-		{
-			@Override
-			public void component(Component object, IVisit<Boolean> visit)
-			{
-				if (object instanceof ConversationalComponent)
-				{
-					visit.stop(true);
-				}
-			}
-		});
-
-		return hasConversational == null ? false : hasConversational;
-	}
-
 	public static void markPageWithConversationId(IRequestHandler handler, String cid)
 	{
 		Page page = getPage(handler);
@@ -304,6 +228,11 @@ public class ConversationPropagator extends AbstractRequestCycleListener
 		return page.getMetaData(CONVERSATION_ID_KEY);
 	}
 
+	public static void removeConversationIdFromPage(Page page)
+	{
+		page.setMetaData(CONVERSATION_ID_KEY, null);
+	}
+	
 	/**
 	 * Resolves a page instance from the request handler iff the page instance
 	 * is already created


[3/4] git commit: formatting

Posted by pa...@apache.org.
formatting


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/4e161cbc
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/4e161cbc
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/4e161cbc

Branch: refs/heads/wicket-6.x
Commit: 4e161cbcc7890de4587de178b64cdc073f3389e4
Parents: a742c6e
Author: Emond Papegaaij <em...@topicus.nl>
Authored: Tue Nov 26 07:51:57 2013 +0100
Committer: Emond Papegaaij <em...@topicus.nl>
Committed: Tue Nov 26 09:09:16 2013 +0100

----------------------------------------------------------------------
 .../java/org/apache/wicket/cdi/AutoConversation.java    |  8 ++++----
 .../java/org/apache/wicket/cdi/BeanManagerLookup.java   |  3 ++-
 .../apache/wicket/cdi/ConversationExpiredException.java |  2 +-
 .../apache/wicket/cdi/ConversationExpiryChecker.java    | 12 +++++++-----
 .../org/apache/wicket/cdi/ConversationPropagator.java   |  2 +-
 .../org/apache/wicket/cdi/ConversationalComponent.java  | 10 ++++++----
 6 files changed, 21 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/4e161cbc/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversation.java
----------------------------------------------------------------------
diff --git a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversation.java b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversation.java
index 6138ac2..b4186f9 100644
--- a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversation.java
+++ b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversation.java
@@ -21,9 +21,9 @@ import javax.enterprise.context.ConversationScoped;
 import org.apache.wicket.util.io.IClusterable;
 
 /**
- * A bean that can be used to override whether the lifecycle of the conversation should be managed
- * automatically or not. See {@link CdiConfiguration#setAutoConversationManagement(boolean)} for
- * details.
+ * A bean that can be used to override whether the lifecycle of the conversation
+ * should be managed automatically or not. See
+ * {@link CdiConfiguration#setAutoConversationManagement(boolean)} for details.
  * 
  * @author igor
  */
@@ -31,7 +31,7 @@ import org.apache.wicket.util.io.IClusterable;
 public class AutoConversation implements IClusterable
 {
 	private static final long serialVersionUID = 1L;
-	
+
 	private boolean automatic;
 
 	public AutoConversation()

http://git-wip-us.apache.org/repos/asf/wicket/blob/4e161cbc/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/BeanManagerLookup.java
----------------------------------------------------------------------
diff --git a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/BeanManagerLookup.java b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/BeanManagerLookup.java
index d9051ba..9220718 100644
--- a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/BeanManagerLookup.java
+++ b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/BeanManagerLookup.java
@@ -27,7 +27,8 @@ public final class BeanManagerLookup
 	{
 	}
 
-	public static BeanManager lookup() {
+	public static BeanManager lookup()
+	{
 		try
 		{
 			return InitialContext.doLookup("java:comp/BeanManager");

http://git-wip-us.apache.org/repos/asf/wicket/blob/4e161cbc/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationExpiredException.java
----------------------------------------------------------------------
diff --git a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationExpiredException.java b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationExpiredException.java
index a9c7eb1..16df7b1 100644
--- a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationExpiredException.java
+++ b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationExpiredException.java
@@ -27,7 +27,7 @@ public class ConversationExpiredException extends RuntimeException
 	private IRequestHandler handler;
 
 	public ConversationExpiredException(Throwable cause, String cid, Page page,
-		IRequestHandler handler)
+			IRequestHandler handler)
 	{
 		super(cause);
 		this.cid = cid;

http://git-wip-us.apache.org/repos/asf/wicket/blob/4e161cbc/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationExpiryChecker.java
----------------------------------------------------------------------
diff --git a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationExpiryChecker.java b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationExpiryChecker.java
index e79f938..62d1cd4 100644
--- a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationExpiryChecker.java
+++ b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationExpiryChecker.java
@@ -30,10 +30,12 @@ import org.slf4j.LoggerFactory;
 
 /**
  * Checks for conversation expiration during page render and throws a
- * {@link ConversationExpiredException} when an expired conversation is detected.
+ * {@link ConversationExpiredException} when an expired conversation is
+ * detected.
  * 
- * For example a link that calls {@link Conversation#end()} but does not redirect to a
- * non-conversation-dependent page will be caught by this listener.
+ * For example a link that calls {@link Conversation#end()} but does not
+ * redirect to a non-conversation-dependent page will be caught by this
+ * listener.
  * 
  * @author igor
  * 
@@ -41,7 +43,7 @@ import org.slf4j.LoggerFactory;
 public class ConversationExpiryChecker implements IComponentOnBeforeRenderListener
 {
 	private static final Logger logger = LoggerFactory.getLogger(ConversationExpiryChecker.class);
-	
+
 	@Inject
 	private Conversation conversation;
 
@@ -61,7 +63,7 @@ public class ConversationExpiryChecker implements IComponentOnBeforeRenderListen
 			{
 				logger.info("Conversation {} has expired for {}", cid, page);
 				throw new ConversationExpiredException(null, cid, page, RequestCycle.get()
-					.getActiveRequestHandler());
+						.getActiveRequestHandler());
 			}
 		}
 	}

http://git-wip-us.apache.org/repos/asf/wicket/blob/4e161cbc/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java
----------------------------------------------------------------------
diff --git a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java
index 9bd0597..3e3cbbf 100644
--- a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java
+++ b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationPropagator.java
@@ -232,7 +232,7 @@ public class ConversationPropagator extends AbstractRequestCycleListener
 	{
 		page.setMetaData(CONVERSATION_ID_KEY, null);
 	}
-	
+
 	/**
 	 * Resolves a page instance from the request handler iff the page instance
 	 * is already created

http://git-wip-us.apache.org/repos/asf/wicket/blob/4e161cbc/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationalComponent.java
----------------------------------------------------------------------
diff --git a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationalComponent.java b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationalComponent.java
index e041a87..3fb541d 100644
--- a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationalComponent.java
+++ b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationalComponent.java
@@ -17,10 +17,12 @@
 package org.apache.wicket.cdi;
 
 /**
- * Marks a component that requires a conversation. This marker is used by the automatic conversation
- * management feature ({@link CdiConfiguration#setAutoConversationManagement(boolean)}) to
- * automatically begin and end conversations based on the presence of these components in the
- * component hierarchy of pages (can be applied to the page itself).
+ * Marks a component that requires a conversation. This marker is used by the
+ * automatic conversation management feature (
+ * {@link CdiConfiguration#setAutoConversationManagement(boolean)}) to
+ * automatically begin and end conversations based on the presence of these
+ * components in the component hierarchy of pages (can be applied to the page
+ * itself).
  * 
  * @author igor
  */