I have a BMP entity bean LookupListEJB which has been declared with commit option D and refresh period of 300 secs. I want to invalidate the cache
through the MBean api. The primary key is 'rule_status'.
I am using the following code which does not seem to invalidate the cache.
MBeanServer server = (MBeanServer)list.get(0);
ObjectInstance object = server.getObjectInstance(new ObjectName("jboss.cache:service=InvalidationManager"));
// Invoke Get Invalidation Group
Object[] parms = new Object[1];
String[] sig = new String[1];
BatchInvalidation[] binvalidate = new BatchInvalidation[1] ;
java.io.Serializable[] id = new String[1] ;
id[0] = new String("rule_status") ;
binvalidate[0] = new BatchInvalidation( id , "LookupListEJB") ;
parms[0] = binvalidate ;
sig = new String[]{"[Lorg.jboss.cache.invalidation.BatchInvalidation;"} ;
server = (MBeanServer)list.get(0);
object = server.getObjectInstance(new ObjectName("jboss.cache:service=InvalidationManager"));
server.invoke(object.getObjectName(), "batchInvalidate", parms, sig);
Please advise.