Java Reference
In-Depth Information
The following diagram depicts a typical exchange of information between the EJB
client application and the remote EJB component:
As you can see, after a successful lookup of an SFSB via JNDI, a proxy is returned
to the client for subsequent method invocations.
Note
Since the EJB is clustered, it will return back a session ID and along with it the
"affinity" of that session, that is, the name of the cluster to which the stateful bean
belongs on the server side. This affinity will later help the EJB client to route the
invocations on the proxy appropriately to a specific node in the cluster.
While this session creation request is going on, NodeA will also send back an asyn-
chronous message that contains the cluster topology. The JBoss EJB client imple-
mentation will take note of this topology information, and will later use it for creation
of connections to nodes within the cluster and routing invocations to those nodes,
whenever necessary.
Now let's assume that NodeA goes down, and the client application subsequently in-
vokes on the proxy. At this stage the JBoss EJB client implementation will be aware
of the cluster topology; therefore, it knows that the cluster has two nodes: NodeA
and NodeB . When the invocation now arrives, it detects that the NodeA is down; so
it uses a selector to fetch a suitable node from among the cluster nodes.
Search WWH ::




Custom Search