I want to have a bean Fooin the host A, which is entered using the annotation @EJBfor the bean Barin the host B.
Both of these nodes are separate standalone instances Glassfish-v3.
When reading the documents, GlassfishI found a lot of information, some of them sounded a bit contradictory.
I realized that every bean has a global jndi assigned to it and understands how it is built. What is the syntax for portable JNDI global names? . I also realized that the declaration Fooin Barshould be something like this (assuming it FooRemoteis a remote business interface Fooand fooejbis its module):, @EJB(lookup=java:global/fooejb/FooRemote) FooRemote foothis is based on this .
I can't figure out where I say host Aand host Bto get to know each other.
I saw many examples for application clients and application servers, but I could not find an example for such a scenario.
In this issue Set sun-web.xmland Global-JNDI, but I think it's not EJB3.1 (since it is not Portable JNDI), and I do not understand where it should be this sun-web.xml(I'd like to avoid it if you can).
This mainly differs in two ways:
- There is no option -Dorg.omg.CORBA.ORBInitialHost = param (as far as I can see)
- Any solution should, of course, allow the inclusion of a third host
C, with which they interact both Afor and Bfor different purposes.
, - , , , .
BTW, .. IP- .
Edit:
, , , .. , A1 A2, , B A1, A2
Edit2:
, ejb 3.1, , jndi. , ejb 3.1, , , 3.0 Global jndi.
, , "" jndi remote beans.
, -.
,