All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sun.enterprise.resource.recovery.ThirdPartyRecoveryResourceHandler Maven / Gradle / Ivy

There is a newer version: 10.0-b28
Show newest version
package com.sun.enterprise.resource.recovery;

import javax.transaction.xa.XAResource;
import java.util.Set;
import java.util.List;

import org.jvnet.hk2.annotations.Service;
import org.jvnet.hk2.annotations.Inject;
import com.sun.enterprise.transaction.spi.RecoveryResourceListener;
import com.sun.enterprise.transaction.spi.RecoveryResourceHandler;
import com.sun.enterprise.transaction.api.RecoveryResourceRegistry;


/**
 * RecoveryResourceHandler for third party resources
 *
 * @author Jagadish Ramu
 */
@Service
public class ThirdPartyRecoveryResourceHandler implements RecoveryResourceHandler {

    @Inject
    private RecoveryResourceRegistry rrr;
    /**
     * {@inheritDoc}
     */
    public void loadXAResourcesAndItsConnections(List xaresList, List connList) {
        Set listeners =
                rrr.getListeners();

        for (RecoveryResourceListener rrl : listeners) {
            XAResource[] xars = rrl.getXAResources();
            for (XAResource xar : xars) {
                xaresList.add(xar);
            }
        }
    }

    /**
     * {@inheritDoc}
     */
    public void closeConnections(List connList) {
        //do nothing
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy