webserver embedded communication
I'm developing a module with an embedded webserver (jetty) and a web application that implements a web service.
I want that my module communicates with web service, the problem is that module, web server and web application have three different classloaders so even if all objects live in a unique process I have different namespaces to manage with.
I don't want to use reflection.
I think that a good way could be one or more memory mapped file that can be used for communication but I have 2 agents that act as both "messages" consumer and producer.
Is there a better way to manage this situation?
If there is not a better one, is there a way to synchronize threads loaded by different classloader?