6 Replies Latest reply on Feb 8, 2012 6:45 AM by Radoslav Husar

    singleton ejb in the cluster

    Riccardo Pasquini Novice



      i did a @Singleton EJB with the TimerService @Resource, it is @Startup and on @PostConstruct it starts a tick (the timer is destroied on @PreDestroy)


      to perform this test i've used the JB AS 7.1.0.Alpha2 configured as full profile... servers in the groups are bound by ha-sockets, so it is a cluster...


      the timed tick happens in both cluster nodes, and this is not what i want... so:


      @Singleton EJBs are singleton per VM and not per cluster, i lack about spec knowledge about this topic... anyway, in previous JBoss releases i was used to add a dependency to ha-barrier and the timed object will be alive only in the master node


      how does  jboss as 7 address this scenario? how can i add something similar to the ha-barrier dependency?


      bye and thnx