0

I am using Infinispan in a WildFly 8 server.

In my application I am using normal java threads and timers. So how can I use it in Infinispan distributed mode with 4 nodes and 2 owners?

My Problem: The thread wakes up every 15 mins in all nodes and inserting 4 times same data in DB. But I want single thread for all nodes.

Sanne
  • 6,027
  • 19
  • 34
Shankar S
  • 133
  • 1
  • 5
  • 15
  • Maybe you need a [Wildfly singleton](https://github.com/wildfly/quickstart/tree/master/cluster-ha-singleton) to be deployed in the cluster to do that work? – Galder Zamarreño May 13 '15 at 08:23
  • Ok, thank you.i tried singleton but i got this ERROR: Clustered annotation is deprecated and will be ignored." – Shankar S May 14 '15 at 09:24
  • Are you sure it's an error? If an annotation is deprecated and hence it's ignored, that's likely a warning message. See https://github.com/wildfly/quickstart/tree/8.x/cluster-ha-singleton for example. – Galder Zamarreño May 19 '15 at 11:39
  • Sorry WARN only . this warning because of Coding or Wildfly setup problem ? – Shankar S May 19 '15 at 13:44
  • I guess because of your code, I guess you should remove @Clustered, but anyway, just follow the quickstart and you should good to go :) – Galder Zamarreño May 22 '15 at 09:10

0 Answers0