2

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.

XXL
  • 1,224
  • 4
  • 12
  • 25

1 Answers1

1

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

Ali HAMDI
  • 365
  • 1
  • 11
  • what about Spring, can the same be achieved? If so - how? – XXL Mar 04 '14 at 14:24
  • Check this Spring documentation, it should tell you how http://docs.spring.io/spring/docs/current/spring-framework-reference/html/remoting.html – Ali HAMDI Mar 05 '14 at 15:02