[seam-commits] Seam SVN: r14042 - in branches/enterprise/JBPAPP_5_0: src/resteasy/org/jboss/seam/resteasy and 1 other directory.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Tue Feb 15 06:15:29 EST 2011
Author: jharting
Date: 2011-02-15 06:15:29 -0500 (Tue, 15 Feb 2011)
New Revision: 14042
Modified:
branches/enterprise/JBPAPP_5_0/examples/tasks/resources/WEB-INF/components.xml
branches/enterprise/JBPAPP_5_0/src/resteasy/org/jboss/seam/resteasy/ResteasyResourceAdapter.java
Log:
JBPAPP-5823
Modified: branches/enterprise/JBPAPP_5_0/examples/tasks/resources/WEB-INF/components.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/tasks/resources/WEB-INF/components.xml 2011-02-14 13:24:10 UTC (rev 14041)
+++ branches/enterprise/JBPAPP_5_0/examples/tasks/resources/WEB-INF/components.xml 2011-02-15 11:15:29 UTC (rev 14042)
@@ -43,7 +43,7 @@
entity-class="org.jboss.seam.example.tasks.entity.Category"
media-types="application/xml application/json application/fastinfoset"/>
- <resteasy:application resource-path-prefix="/v1" destroy-session-after-request="false">
+ <resteasy:application resource-path-prefix="/v1" destroy-session-after-request="true">
<resteasy:media-type-mappings>
<key>xml</key>
<value>application/xml</value>
Modified: branches/enterprise/JBPAPP_5_0/src/resteasy/org/jboss/seam/resteasy/ResteasyResourceAdapter.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/resteasy/org/jboss/seam/resteasy/ResteasyResourceAdapter.java 2011-02-14 13:24:10 UTC (rev 14041)
+++ branches/enterprise/JBPAPP_5_0/src/resteasy/org/jboss/seam/resteasy/ResteasyResourceAdapter.java 2011-02-15 11:15:29 UTC (rev 14042)
@@ -146,8 +146,13 @@
}
finally
{
- // Prevent anemic sessions clog up the server
- if (application.isDestroySessionAfterRequest())
+ /*
+ * Prevent anemic sessions clog up the server
+ *
+ * session.isNew() check - do not close non-anemic sessions established by the view layer (JSF)
+ * which are reused by the JAX-RS requests (so that the requests do not have to be re-authorized)
+ */
+ if (application.isDestroySessionAfterRequest() && request.getSession().isNew())
{
log.debug("Destroying HttpSession after REST request");
Session.instance().invalidate();
More information about the seam-commits
mailing list