10.15@ManagedSharedTransaction
The following Java code defines the @ManagedSharedTransaction annotation:
package org.oasisopen.sca.annotation;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static org.oasisopen.sca.Constants.SCA_PREFIX;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* The @ManagedSharedTransaction annotation is used to indicate that
* a distributed ACID transaction is required.
*/
@Inherited
@Target({TYPE, FIELD, METHOD, PARAMETER})
@Retention(RUNTIME)
@Intent(ManagedSharedTransaction.MANAGEDSHAREDTRANSACTION)
public @interface ManagedSharedTransaction {
String MANAGEDSHAREDTRANSACTION = SCA_PREFIX + "managedSharedTransaction";
}
The @ManagedSharedTransaction annotation is used to indicate the need for a distributed and globally coordinated ACID transaction. See the SCA Policy Framework Specification [POLICY] for details on the meaning of the intent. See the section on Application of Intent Annotations for samples of how intent annotations are used in Java.
10.16@ManagedTransaction
The following Java code defines the @ManagedTransaction annotation:
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static org.oasisopen.sca.Constants.SCA_PREFIX;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* The @ManagedTransaction annotation is used to indicate the
* need for an ACID transaction environment.
*/
@Inherited
@Target({TYPE, FIELD, METHOD, PARAMETER})
@Retention(RUNTIME)
@Intent(ManagedTransaction.MANAGEDTRANSACTION)
public @interface ManagedTransaction {
String MANAGEDTRANSACTION = SCA_PREFIX + "managedTransaction";
String MANAGEDTRANSACTION_MESSAGE = MANAGEDTRANSACTION + ".local";
String MANAGEDTRANSACTION_TRANSPORT = MANAGEDTRANSACTION + ".global";
/**
* List of managedTransaction qualifiers (such as "global" or "local").
*
* @return managedTransaction qualifiers
*/
@Qualifier
String[] value() default "";
}
The @ManagedTransaction annotation is used to indicate the need for an ACID transaction. See the SCA Policy Framework Specification [POLICY] for details on the meaning of the intent. See the section on Application of Intent Annotations for samples of how intent annotations are used in Java.
10.17@MutualAuthentication
The following Java code defines the @MutualAuthentication annotation:
package org.oasisopen.sca.annotation;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static org.oasisopen.sca.Constants.SCA_PREFIX;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* The @MutualAuthentication annotation is used to indicate that
* a mutual authentication policy is needed.
*/
@Inherited
@Target({TYPE, FIELD, METHOD, PARAMETER})
@Retention(RUNTIME)
@Intent(MutualAuthentication.MUTUALAUTHENTICATION)
public @interface MutualAuthentication {
String MUTUALAUTHENTICATION = SCA_PREFIX + "mutualAuthentication";
}
The @MutualAuthentication annotation is used to indicate the need for mutual authentication between a service consumer and a service provider. See the SCA Policy Framework Specification [POLICY] for details on the meaning of the intent. See the section on Application of Intent Annotations for samples of how intent annotations are used in Java.
10.18@NoManagedTransaction
The following Java code defines the @NoManagedTransaction annotation:
package org.oasisopen.sca.annotation;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static org.oasisopen.sca.Constants.SCA_PREFIX;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* The @NoManagedTransaction annotation is used to indicate that
* a non-transactional environment is needed.
*/
@Inherited
@Target({TYPE, FIELD, METHOD, PARAMETER})
@Retention(RUNTIME)
@Intent(NoManagedTransaction.NOMANAGEDTRANSACTION)
public @interface NoManagedTransaction {
String NOMANAGEDTRANSACTION = SCA_PREFIX + "noManagedTransaction";
}
The @NoManagedTransaction annotation is used to indicate that the component does not want to run in an ACID transaction. See the SCA Policy Framework Specification [POLICY] for details on the meaning of the intent. See the section on Application of Intent Annotations for samples of how intent annotations are used in Java.
Share with your friends: |