[jboss-user] [Clustering/JBoss] - Re: EJB3 timer and cluster behaviour (JBoss 5.0.0)

dyazbek do-not-reply at jboss.com
Fri Sep 12 03:13:25 EDT 2008


Hi wdfink
I recently implemented the exact same thing with JBoss EAP v4.2-CP02.

http://docs.jboss.org/jbossas/jboss4guide/r4/html/cluster.chapt.html#clustering-jms-loadbalanced

I did the following:
On each JBoss machine, replaced DefaultDS to a real, external database. By default, JBoss uses HSQLDB internally, and ofcorse, this is not common between multiple instances of JBoss on different machines. See section 16.6.1.1 of the above doc for instructions on how to do this.

In the jboss.xml of my war file, i added:


  | <message-driven>
  |             <ejb-name>BlahMDB</ejb-name>
  |             <depends>jboss.ha:service=HASingletonDeployer,type=Barrier</depends>
  |         </message-driven>
  | 

I then deploy the ear file containing this war file to the farm directory.

What I saw was that all clusters installed BlahMDB, but only one cluster actually started it, (and the assocated timers it has). I configured BlahMDB to tick every 30seconds, then create a new one, and tick 30seconds later. So, this timer was ticking on only one instance of the cluster.
When i killed JBoss on that instance, the ticks would automagically resume on some other node in the cluster.

Hope this helps!

-Daniel.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176037#4176037

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176037



More information about the jboss-user mailing list