Probably you should start thinking about something like
JMS or
Vertex to communicate between both applications.
If you move both into the same project and functionalities are not really meant to be coupled, I guess you should still keep using something like an event bus to communicate between both, not calling directly the correspondent API’s from one or the other side.
@Mohammed
a set of more to my problem:
I have a main-live-page/application and many “small”-clients-applications. Alle 'clients" should communicate with the main-page…(on one server …)
but i think Francisco identify my problem very good…
@Francisco
Thanks, all keyword very interesting !
I guess JMS is very nice approach, Vert.x too but maybe oversize for my problem… (but good to know
Tip over Guava,s Event is also worth a lot