[forge-issues] [JBoss JIRA] (FORGE-2060) Being able to create a new CDI interceptor
George Gastaldi (JIRA)
issues at jboss.org
Mon Oct 6 17:31:11 EDT 2014
[ https://issues.jboss.org/browse/FORGE-2060?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
George Gastaldi updated FORGE-2060:
-----------------------------------
Status: Closed (was: Pull Request Sent)
Fix Version/s: 2.12.1.Final
(was: 2.x Future)
Resolution: Done
> Being able to create a new CDI interceptor
> ------------------------------------------
>
> Key: FORGE-2060
> URL: https://issues.jboss.org/browse/FORGE-2060
> Project: Forge
> Issue Type: Sub-task
> Components: Java EE
> Affects Versions: 2.12.0.Final
> Reporter: Antonio Goncalves
> Assignee: Antonio Goncalves
> Fix For: 2.12.1.Final
>
>
> It would be good to have a command to generate a CDI interceptor. A simple command such as :
> {code}
> cdi-new-interceptor --named LoggingInterceptor ;
> {code}
> Would generate :
> {code}
> @Interceptor
> public class LoggingInterceptor {
> @AroundInvoke
> public Object logMethod(InvocationContext ic) throws Exception {
> try {
> return ic.proceed();
> } finally {
> }
> }
> }
> {code}
> There could even have another parameter to add an existing interceptor binding
> {code}
> cdi-new-interceptor --named LoggingInterceptor --binding Loggable ;
> {code}
> Would add the Loggable interceptor binding to the class :
> {code}
> @Interceptor
> @Loggable
> public class LoggingInterceptor {
> @AroundInvoke
> public Object logMethod(InvocationContext ic) throws Exception {
> try {
> return ic.proceed();
> } finally {
> }
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
More information about the forge-issues
mailing list