public EventPriority getPriority() {
return EventPriority.SYNC_LOW;
}
public void handle(final IEvent arg0) {
EZBClusteredBeanEvent clusterEvent = (EZBClusteredBeanEvent) arg0;
if (EZBClusteredBeanEvent.STARTING.equals(clusterEvent.getState())
|| EZBClusteredBeanEvent.STOPPING.equals(clusterEvent.getState())) {
for (EZBRef reference : clusterEvent.getReferences()) {
if (reference instanceof RemoteCallRef) {
Factory<?, ?> factory = reference.getFactory();
if (factory instanceof SessionFactory) {
SessionFactory<?> fact = ((SessionFactory<?>) factory);
Object cluster = fact.getBeanInfo().getCluster();
Class<?> beanClass = fact.getBeanClass();
Class<?> itfClass = null;
if (cluster != null || beanClass.isAnnotationPresent(Cluster.class)) {
if (EZBClusteredBeanEvent.STARTING.equals(clusterEvent.getState())) {
String itfClassname = reference.getItfClassName();
logger.info("The bean with the jndi name {0} and the interface name {1} is clustered.",
reference.getJNDIName(), itfClassname);
for (Class<?> klass : beanClass.getInterfaces()) {
if (klass.getName().equals(itfClassname)) {