[ 
https://issues.apache.org/jira/browse/SLING-12372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler updated SLING-12372:
-------------------------------------
    Description: 
With the recent changes in Apache Felix Http Jetty 5.x of making Felix 
compatible with both javax and jakarta, new ServletRequestWrappers were 
introduced: This bug is *only* affecting installations where Http Jetty 5.x or 
Http Jetty12 is sued. Installations where Http Jetty 4.x is used are not 
affected

[https://github.com/apache/felix-dev/blob/master/http/wrappers/src/main/java/org/apache/felix/http/javaxwrappers/ServletRequestWrapper.java#L79]

This causes issues for the cleanup / disposing of requests after a 
requestDestroyed event is caught in the ModelAdapterFactory, namely there is a 
check if the request is of type javax.http.ServletRequestWrapper, which no 
longer matches with org.apache.felix.http.javaxwrappers.ServletRequestWrapper:

[https://github.com/apache/sling-org-apache-sling-models-impl/blob/master/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java#L796]

This causes the callbacks to never be cleaned up, because the original 
ServletRequest is not matched seeing as it is a new wrapper object compared to 
the one that was put.

  was:
With the recent changes in Apache Felix of making Felix compatible with both 
javax and jakarta, new ServletRequestWrappers were introduced:

[https://github.com/apache/felix-dev/blob/master/http/wrappers/src/main/java/org/apache/felix/http/javaxwrappers/ServletRequestWrapper.java#L79]

This causes issues for the cleanup / disposing of requests after a 
requestDestroyed event is caught in the ModelAdapterFactory, namely there is a 
check if the request is of type javax.http.ServletRequestWrapper, which no 
longer matches with org.apache.felix.http.javaxwrappers.ServletRequestWrapper:

[https://github.com/apache/sling-org-apache-sling-models-impl/blob/master/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java#L796]

This causes the callbacks to never be cleaned up, because the original 
ServletRequest is not matched seeing as it is a new wrapper object compared to 
the one that was put.


> ModelAdapterFactory is not cleaning up the requests correctly
> -------------------------------------------------------------
>
>                 Key: SLING-12372
>                 URL: https://issues.apache.org/jira/browse/SLING-12372
>             Project: Sling
>          Issue Type: Bug
>            Reporter: Roy Teeuwen
>            Assignee: Carsten Ziegeler
>            Priority: Critical
>             Fix For: Models Implementation 1.7.2
>
>
> With the recent changes in Apache Felix Http Jetty 5.x of making Felix 
> compatible with both javax and jakarta, new ServletRequestWrappers were 
> introduced: This bug is *only* affecting installations where Http Jetty 5.x 
> or Http Jetty12 is sued. Installations where Http Jetty 4.x is used are not 
> affected
> [https://github.com/apache/felix-dev/blob/master/http/wrappers/src/main/java/org/apache/felix/http/javaxwrappers/ServletRequestWrapper.java#L79]
> This causes issues for the cleanup / disposing of requests after a 
> requestDestroyed event is caught in the ModelAdapterFactory, namely there is 
> a check if the request is of type javax.http.ServletRequestWrapper, which no 
> longer matches with org.apache.felix.http.javaxwrappers.ServletRequestWrapper:
> [https://github.com/apache/sling-org-apache-sling-models-impl/blob/master/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java#L796]
> This causes the callbacks to never be cleaned up, because the original 
> ServletRequest is not matched seeing as it is a new wrapper object compared 
> to the one that was put.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to