This example shows the definition of the TxManager class. This class defines events for the start and end of transactions that are performed by a transaction manager.
The methods in this class are as follows:
This method sends an event to indicate the start of a transaction. The name of the event type that is associated with this method is begin. A parameter that is named txId is passed to the method.
This method sends an event to indicate the end of a transaction. The name of the event type that is associated with this method is end. A parameter that is named outcome is passed to the method.
import org.glassfish.external.probe.provider.annotations.Probe;
import org.glassfish.external.probe.provider.annotations.ProbeParam;
import org.glassfish.external.probe.provider.annotations.ProbeProvider;
@ProbeProvider(moduleProviderName="examplecomponent",
moduleName="transaction", probeProviderName="manager")
public class TxManager {
@Probe("begin")
public void onTxBegin(
@ProbeParam("{txId}") String txId
){}
@Probe ("end")
public void onCompletion(
@ProbeParam("{outcome}") boolean outcome
){}
}