Search in sources :

Example 1 with RecoveryEventListener

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);
        }
    });
}
Also used : WSATRuntimeConfig(com.sun.xml.ws.tx.dev.WSATRuntimeConfig) Config(com.sun.enterprise.config.serverbeans.Config) WSATRuntimeConfig(com.sun.xml.ws.tx.dev.WSATRuntimeConfig) RecoveryEventListener(com.sun.enterprise.transaction.spi.RecoveryEventListener)

Aggregations

Config (com.sun.enterprise.config.serverbeans.Config)1 RecoveryEventListener (com.sun.enterprise.transaction.spi.RecoveryEventListener)1 WSATRuntimeConfig (com.sun.xml.ws.tx.dev.WSATRuntimeConfig)1