Broadcast Messaging provider implementation based on HTTP protocol and suitable for servlet based applications.

Two the most important features of this BCM provider implementation are, first, since every cluster member has the list of all other cluster members locally, it is completely decentralized and does not require any kind of central hub or server. Second, it uses HTTP protocol for communication and thus can go over different networks, firewalls and even proxies.

To enable this BCM provider set com.boylesoftware.cb2.broadcastMessaging.provider.class application property to com.boylesoftware.cb2.bcmproviders.http.HttpBCMProvider.

In order to make it work you need to add a special servlet descriptor to your web.xml file:

...

<servlet>
  <servlet-name>bcmreceiver</servlet-name>
  <display-name>The CB2 BCM Receiver</display-name>
  <servlet-class>com.boylesoftware.cb2.bcmproviders.http.ReceiverServlet</servlet-class>
  <load-on-startup>12</load-on-startup>
</servlet>

...

<servlet-mapping>
  <servlet-name>bcmreceiver</servlet-name>
  <url-pattern>/cb2-bcm</url-pattern>
</servlet-mapping>

...

Then, you need to provide it with the list of cluster members. This list can be specified in the application properties and for every cluster member, including the local one, should include a com.boylesoftware.cb2.broadcastMessaging.http.xxx.url property, where xxx is a free-form member name, defining the HTTP URL of its receiver servlet.

Also, the communication between the cluster members is protected with a password, which is shared by all the members. The password should be defined by application property called com.boylesoftware.cb2.broadcastMessaging.http.password and, obviously, should be the same on all cluster members.