[weld-issues] [JBoss JIRA] Assigned: (WELD-314) Interceptors applied twice on beans when there is a decorator

Pete Muir (JIRA) jira-events at lists.jboss.org
Thu Jan 7 08:26:31 EST 2010


     [ https://jira.jboss.org/jira/browse/WELD-314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pete Muir reassigned WELD-314:
------------------------------

    Assignee: Marius Bogoevici


> Interceptors applied twice on beans when there is a decorator
> -------------------------------------------------------------
>
>                 Key: WELD-314
>                 URL: https://jira.jboss.org/jira/browse/WELD-314
>             Project: Weld
>          Issue Type: Bug
>          Components: Interceptors and Decorators
>    Affects Versions: 1.0.0.GA
>         Environment: Os: Linux
> AppServer: Glassfish v3 b73
>            Reporter: Wayne Zhang
>            Assignee: Marius Bogoevici
>             Fix For: 1.0.1.CR1
>
>         Attachments: WeldApp1NB.zip
>
>
> Interceptors applied twice when there is a decorator. The following log is from a example application. Bean SimplePaymentService has two interceptors - AuditInterceptor and TransactionInterceptor. Also, SimplePaymentService has a decorator - SecurePaymentService. When business method pay() is called, these 2 interceptors called twice: (Example application in a NetBeans 6.8 project attached)
> [#|2009-11-24T14:29:03.887+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,885 - INFO weld.lab1.interceptor.TransactionInterceptor - Start transaction for weld.lab1.service.SimplePaymentService_$$_javassist_384, instance=weld.lab1.service.SimplePaymentService at 1b5adb0
> |#]
> [#|2009-11-24T14:29:03.888+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,887 - INFO weld.lab1.interceptor.AuditInterceptor - Method public boolean weld.lab1.service.SimplePaymentService.pay(java.lang.String,java.math.BigDecimal) throws java.lang.Exception on Bean class org.jboss.interceptor.proxy.AbstractClassInterceptionHandler$DelegatingInvocationContext invoked.
> |#]
> [#|2009-11-24T14:29:03.888+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,888 - INFO weld.lab1.service.SecurePaymentService - I'm a secure payment service
> |#]
> [#|2009-11-24T14:29:03.888+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,888 - INFO weld.lab1.interceptor.TransactionInterceptor - Start transaction for weld.lab1.service.SimplePaymentService_$$_javassist_384, instance=weld.lab1.service.SimplePaymentService at 1b5adb0
> |#]
> [#|2009-11-24T14:29:03.888+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,888 - INFO weld.lab1.interceptor.AuditInterceptor - Method public boolean weld.lab1.service.SimplePaymentService.pay(java.lang.String,java.math.BigDecimal) throws java.lang.Exception on Bean class org.jboss.interceptor.proxy.AbstractClassInterceptionHandler$DelegatingInvocationContext invoked.
> |#]
> [#|2009-11-24T14:29:03.888+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,888 - INFO weld.lab1.service.SimplePaymentService - Pay $0.03 for NetBeans.
> |#]
> [#|2009-11-24T14:29:03.904+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,904 - INFO weld.lab1.event.PaymentServiceListener - Payment processed: account=NetBeans, amount=0.03
> |#]
> [#|2009-11-24T14:29:03.905+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,905 - INFO weld.lab1.interceptor.TransactionInterceptor - Transaction commited.
> |#]
> [#|2009-11-24T14:29:03.905+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,905 - INFO weld.lab1.event.PaymentServiceListener - Payment success: account=NetBeans, amount=0.03
> |#]
> [#|2009-11-24T14:29:03.905+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,905 - INFO weld.lab1.interceptor.TransactionInterceptor - Transaction commited.
> |#]

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list