Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel

./geronimo.sh run --long -Dopenejb.client.requestretry=true

Developing the client

EJB clients must know the address of EJB members to make sure that its request will be handled with high availability regardless EJB members are clustered in Multipoint or Multicast way.

...

Section
Column
width50%
Code Block
titleURI for Multicast
Properties p = new Properties();
p.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory");
p.setProperty(Context.PROVIDER_URL,"multicast://239.255.3.2:6142?group=cluster1");
...
Column
width50%
Code Block
titleURI for Multipoint/Unicast
Properties p = new Properties();
p.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory");
p.setProperty(Context.PROVIDER_URL,"failover:ejbd://ejbd://foo:4201");
...

failover strategies

OpenEJB supports 3 kinds of failover strategies for failover when the original node was shutdown abnormally.

...

sticky
Code Block
title
round-robin

Properties p = new Properties();
p.setProperty(Context.PROVIDER_URL,"failover:round-robin:ejbd://foo:4201,
ejbd
ejbds://bar:4201,multicast://239.255.2.3:6142");
...
Section
column
Column
width30%50%
Code Block
titleround-robinsticky
Properties p = new Properties();
p.setProperty(Context.PROVIDER_URL,"failover:round-robin:ejbd://foo:4201,ejbdsejbd://bar:4201,multicast://239.255.2.3:6142");
...
30%
Column
width
50%
Code Block
titlerandom
Properties p = new Properties();
p.setProperty(Context.PROVIDER_URL,"failover:random:ejbd://foo:4201,ejbd://bar:4201");
...

...

Starting from Geronimo 2.2.12, unicast-based support is provided. WADI can be configured to use unicast instead of multicast to support failover for Stateless Session Bean.

...