Issue Type: Bug Bug
Affects Versions: 1.1.8.Final
Assignee: Jozef Hartinger
Components: Interceptors and Decorators
Created: 02/Jul/13 6:08 AM
Description:

May be related to WELD-1346. But event observer IS business method (or not?).
I have interceptor class:

package com.acme;
@EventContextual @Interceptor
public class ContextInterceptor {

    @AroundInvoke
    public Object injectContext(InvocationContext context) throws Exception {
        System.out.println("hello from interceptor");
        return context.proceed();
    }

}

Interceptor binding definition:

package com.acme;
@InterceptorBinding
@Target({METHOD, TYPE})
@Retention(RUNTIME)
@Inherited
@Qualifier
public @interface EventContextual { }

bean.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
    <interceptors>
        <class>com.acme.ContextInterceptor</class>
    </interceptors>
</beans>

Event observer method within bean:

package com.acme;
@Stateless
@Local
@EventContextual //  just in case method annotation does not work
public class ButtonPressedEventHandler  implements Serializable {
@EventContextual
public void handle(
            @Observes
            Message event) {
// handle event
}
}

I dispatch event using standard Event<Message> injected facility and never get "hello from interceptor" message in the output ("handle" method of bean was called though)
What I'm doing wrong?

Environment: glassfish 3.1.2.2. embedded
Project: Weld
Priority: Major Major
Reporter: Angry Gami
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira