August 2018
Intermediate to advanced
314 pages
8h 9m
English
In the following code, we have the Transactional annotation, which is a Qualifier used to inject the Transaction class:
import javax.inject.Qualifier;import java.lang.annotation.Retention;import java.lang.annotation.Target;import static java.lang.annotation.ElementType.*;import static java.lang.annotation.RetentionPolicy.RUNTIME;@Qualifier@Retention(RUNTIME)@Target({TYPE, METHOD, FIELD, PARAMETER})public @interface Transactional {}
In the preceding code block, we have the TransactionFactory class, which is responsible for creating new instances of the Transaction class. This class uses the @Singleton annotation, which is an EJB annotation used to create a singleton pattern with the Java EE mechanism. ...
Read now
Unlock full access