Domanda

I'm not sure what I'm attempting is possible, therefore I'm looking for advice / guidance on the subject. Say I've got 2 maven modules running simultaneously, with module B having module A specified as dependency. I've also got an application server running - WildFly (JBoss) - that is serving as a launching entity for those modules.

The problem: I need to access the same bean instance (object reference) on module B that is first initialized in module A. Basically, this is a type of resource sharing / shared memory access. Conventional ways that come to mind are CRUD operations on a database, but I'm wondering if there's an actual way of sharing bean instances between running modules? Could the AS help in this regard in any way as well - as in, perhaps I could move the initialization there and somehow share the instances between modules?

Thank you.

È stato utile?

Soluzione

I believe that EJB is a possible solution to the requirement you are exposing. https://docs.jboss.org/author/display/WFLY8/EJB+invocations+from+a+remote+client+using+JNDI

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top