]> source.dussan.org Git - vaadin-framework.git/commit
Derive current servlet/portlet from the current service (#11779)
authorLeif Åstrand <leif@vaadin.com>
Tue, 21 May 2013 10:33:44 +0000 (13:33 +0300)
committerLeif Åstrand <leif@vaadin.com>
Tue, 21 May 2013 10:33:44 +0000 (13:33 +0300)
commit778de066b1f8b1608b40bdd98b61b6fee078442d
tree775cddd66437e673eea226287c06d4d8eef9e016
parent42c4b2097bc955ca18107c449e04f0d5d5683ca3
Derive current servlet/portlet from the current service (#11779)

Implement VaadinPortlet.getCurrent() to use VaadinService.getCurrent()
instead of having a separate thread local variable. This is done to
avoid classloading issues when determining which instances to preserve
in CurrentInstance.setThreadLocals. The two current instances have
previously been kept in sync in all cases except during
VaadinPortlet.init where VaadinService has not yet been created.

VaadinPortlet.setCurrent() is removed as no way of preserving its
semantics has been found. This breaks API compatibility, but is probably
better than having a deprecated implementation that can not work as
expected in all situations.

The same changes have also been made to VaadinServlet to maintain the
symmetry.

Change-Id: I0a1ccc07a4aeecec558a9aaae211bd56207313d8
server/src/com/vaadin/server/VaadinPortlet.java
server/src/com/vaadin/server/VaadinServlet.java
server/src/com/vaadin/util/CurrentInstance.java