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

org.fabric3.tx.JtaTransactionDecorator Maven / Gradle / Ivy

There is a newer version: 3.1.0
Show newest version
package org.fabric3.tx;

import javax.transaction.TransactionManager;

import org.fabric3.api.annotation.monitor.Monitor;
import org.fabric3.spi.container.wire.InvocationChain;
import org.fabric3.spi.container.wire.TransactionDecorator;
import org.oasisopen.sca.annotation.Reference;

/**
 *
 */
public class JtaTransactionDecorator implements TransactionDecorator {
    private TxInterceptor interceptor;

    public JtaTransactionDecorator(@Reference TransactionManager transactionManager, @Monitor TxMonitor monitor) {
        interceptor = new TxInterceptor(transactionManager, TxAction.BEGIN, monitor);
    }

    public void transactional(InvocationChain chain) {
        chain.addInterceptor(interceptor);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy