arjantijms commented on pull request #399:
URL: https://github.com/apache/tomcat/pull/399#issuecomment-752685025


   Yet another example, Weld is using similar tricks to integrate with Tomcat:
   
   
https://github.com/weld/core/blob/master/environments/servlet/core/src/main/java/org/jboss/weld/environment/tomcat/WeldForwardingInstanceManager.java#L97
   
   ```java
     // Hack into Tomcat to replace the InstanceManager using
     // reflection to access private fields
     ApplicationContext appContext = (ApplicationContext) 
getContextFieldValue((ApplicationContextFacade) context, 
ApplicationContextFacade.class);
   ```
   
   It's not the average application that needs this, but libs like Weld (CDI) 
or Soteria (Jakarta Security) definitely have a need for this.
   
   


----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to