1 of 1 people found this helpful
I don't think it's possible. If you start Weld using SE extension (http://docs.jboss.org/weld/reference/latest/en-US/html/environments.html#d0e5495) and run embedded Jetty and deploy a different web application (with Weld servlet extension) then these are logically two different/isolated apps (even though they run on the same JVM). I'm not sure how embedded Jetty classloading works but I wouldn't experiment with this. Do you need CDI services in your standalone app at all? And what is the motivation for having a shared app context?
My application is "modular". Embedded Jetty is created by a module which is instantiated and configured by CDI.
Another module create RMI interface. Events coming from this module must be propagated to WebApp module and vice versa.
But maybe this module can be created by Weld servlet extension (from 1st module)...