Good news is the metrics failures have gone but it's still failing for some
reason.  Any ideas why?

I know one tweak I made recently was changing the .startsWith("*") to
.equals("*"). While I'm not certain if that would break other scenarios, I
just don't like changing something like that because, like I said... I just
don't know about other scenarios - even though it works for me.  So I have
undone that (it was bugging me) and am offering a (hopefully you'll agree)
better solution...

I really think the problem is the CXFJAXRSFilter approach itself.  Currently
it tries to process most stuff itself because the logic for ruling out
non-CXF requests seems to be flaweed.

So I've written out the fix I had in mind.  I've thought about this and
think it's the best approach to be robust and play nicely with existing non
CXF apps - leaving them untouched and non-interfering.

I've added a function "isCXFResource(request)" to the CxfRsHttpListener
which the filter calls to check if the servletpath is a registered CXF
endpoint.  If it is not, it passes on down the chain completely untouched
which means all existing non-CXF should work 100% as before.

I've also left the existing logic for CXF apps exactly as before for when it
is actually a CXF app.  That logic makes sense there e.g. when static
content exists in a path that also a CXF app.

Just tested this now for the all the apps I have here and it's the first
time everything works 100% and CXF plays nicely with existing webapps too.

I know I'm not aware of all the scenarios, but I think this has to be best
approach for any filter...  it should leave what it shouldn't be concerned
about untouched and not make it it's own business.

So I will shortly submit a PR for this against TOMEE-2408 for review and
consideration. :)

I'm hoping this may also help with buildbot.  JSP will now work with MP
enabled at least :)



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html

Reply via email to