raducotescu commented on issue #5: SLING-8328 - The XSSFilterImpl component 
cannot start on Jboss 7 deployments
URL: 
https://github.com/apache/sling-org-apache-sling-xss/pull/5#issuecomment-477061575
 
 
   Normally the `javax.xml` package is boot delegated. However, starting with 
[SLING-8321](https://issues.apache.org/jira/browse/SLING-8321) we had to embed 
the `javax.xml` implementations provided by `xml-apis`, so that the 
`org.apache.sling.xss` bundle correctly works when executed on IBM's J9 JVM, 
which doesn't provide `org.w3c.dom.ElementTraversal` - see more explanations in 
that issue.
   
   Since then, we've discovered issues with the SPI factories from `javax.xml`, 
since every application server provides its own implementations which are 
different from the ones provided by the JVMs and are also a bit different than 
the ones provided by the embedded `xml-apis`. The two Factories you see here 
are overridden versions of what's normally available in the JVMs but they make 
sure that the implementations being picked up at runtime for our bundle are the 
embedded ones, rather than the ones wired by the application servers.
   
   Granted, the final code can and will be nicer. The PR here was the first 
attempt to figure out what we need to do to make the `org.apache.sling.xss` 
bundle work correctly on J9 (mainly when deployed on WebSphere) and Jboss.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to