use of com.sun.enterprise.transaction.spi.RecoveryEventListener in project Payara by payara.
the class MetroContainer method initializeWsTxRuntime.
/**
* Initialization of WS-TX runtime configuration
*/
private void initializeWsTxRuntime() {
final String serverName = serverContext.getInstanceName();
final Config config = serverContext.getConfigBean().getConfig();
final WSATRuntimeConfig.TxlogLocationProvider txlogLocationProvider = new WSATRuntimeConfig.TxlogLocationProvider() {
@Override
public String getTxLogLocation() {
return txManager.getTxLogLocation();
}
};
WSATRuntimeConfig.initializer().hostName(getHostName()).httpPort(getHttpPort(false, serverName, config)).httpsPort(getHttpPort(true, serverName, config)).txLogLocation(txlogLocationProvider).done();
final WSATRuntimeConfig.RecoveryEventListener metroListener = WSATRuntimeConfig.getInstance().new WSATRecoveryEventListener();
recoveryRegistry.addEventListener(new RecoveryEventListener() {
@Override
public void beforeRecovery(boolean delegated, String instance) {
metroListener.beforeRecovery(delegated, instance);
}
@Override
public void afterRecovery(boolean success, boolean delegated, String instance) {
metroListener.afterRecovery(success, delegated, instance);
}
});
}
Aggregations