com.xebialabs.deployit.core.rest.resteasy
Class OpenJcrSessionDuringRequestInterceptor

java.lang.Object
  extended by com.xebialabs.deployit.core.rest.resteasy.OpenJcrSessionDuringRequestInterceptor
All Implemented Interfaces:
org.jboss.resteasy.spi.interception.PostProcessInterceptor, org.jboss.resteasy.spi.interception.PreProcessInterceptor

@Provider
@Component
public class OpenJcrSessionDuringRequestInterceptor
extends java.lang.Object
implements org.jboss.resteasy.spi.interception.PreProcessInterceptor, org.jboss.resteasy.spi.interception.PostProcessInterceptor

Opens and closes Jcr Sessions and NodeReaderContexts. If an exception occurs, the postProcess isn't called, but the ClosingExceptionMapper cleans up after us in that case.


Constructor Summary
OpenJcrSessionDuringRequestInterceptor()
           
 
Method Summary
 void postProcess(org.jboss.resteasy.core.ServerResponse response)
           
 org.jboss.resteasy.core.ServerResponse preProcess(org.jboss.resteasy.spi.HttpRequest request, org.jboss.resteasy.core.ResourceMethod method)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenJcrSessionDuringRequestInterceptor

public OpenJcrSessionDuringRequestInterceptor()
Method Detail

postProcess

public void postProcess(org.jboss.resteasy.core.ServerResponse response)
Specified by:
postProcess in interface org.jboss.resteasy.spi.interception.PostProcessInterceptor

preProcess

public org.jboss.resteasy.core.ServerResponse preProcess(org.jboss.resteasy.spi.HttpRequest request,
                                                         org.jboss.resteasy.core.ResourceMethod method)
                                                  throws org.jboss.resteasy.spi.Failure,
                                                         javax.ws.rs.WebApplicationException
Specified by:
preProcess in interface org.jboss.resteasy.spi.interception.PreProcessInterceptor
Throws:
org.jboss.resteasy.spi.Failure
javax.ws.rs.WebApplicationException