return nmr;
}
protected ClusterEngine createCluster(NMR nmr, String name, Transacted transacted, boolean rollbackOnErrors) throws Exception {
ClusterEngine cluster = new ClusterEngine();
AbstractPollingRequestorPool pool = createPool();
pool.setDestinationName("destination");
pool.setConnectionFactory(connectionFactory);
pool.setTransactionManager(transactionManager);
pool.setTransacted(transacted);
pool.setAutoStartup(false);
pool.setTaskExecutor(executor);
pool.afterPropertiesSet();
cluster.setPool(pool);
cluster.setName(name);
cluster.setRollbackOnErrors(rollbackOnErrors);
nmr.getEndpointRegistry().register(cluster,
ServiceHelper.createMap(Endpoint.NAME, name));