Created
August 5, 2014 05:51
-
-
Save dilnei/208c9ead95d578a92b44 to your computer and use it in GitHub Desktop.
Interceptor para a transação
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.weblog.interceptor; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; | |
import javax.interceptor.InterceptorBinding; | |
/** | |
* | |
* @author Dilnei | |
* | |
* Tratamos a transação sempre antes de executar uma lógica e depois da | |
* renderização da View, a idéia é a mesma do filtro no entanto ganhamos a | |
* integração da Injeção de Dependências do CDI, esta annotation indica quem | |
* sera interceptado. | |
*/ | |
@InterceptorBinding | |
@Target({ElementType.TYPE, ElementType.METHOD}) | |
@Retention(RetentionPolicy.RUNTIME) | |
public @interface Transactional { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment