java - CDI Interceptors working only while using Jrebel -


i'm experiencing cdi interceptors binding issues , couldn't figure out wrong.

while i'm developing using eclipse, jrebel agent active, interceptors work well, when deploy same application, @ same glassfish instalation, time ear file using asadmin command, interceptors ignored. same happens when turn jrebel agent off.

i'm using glassfish 3.1.2.2 weld 1.1.11 , jdk 1.6.

my application multi-module maven project like:

app  \--module-ejb1 (annotation , interceptor resides here.)     \--meta-inf\beans.xml (with interceptor declaration)  \--module-ejb2     \--meta-inf\beans.xml (empty one)  \--module-jar     \--meta-inf\beans.xml (empty one)  \--module-war     \--web-inf\beans.xml (empty one)  \--module-ear 

my annotation:

@interceptorbinding @target({ type, method }) @retention(runtime) public @interface audited { } 

my interceptor class:

@audited @interceptor public class auditinterceptor implements serializable {    [...] } 

my intercepted method:

@override @audited public e save(e model) throws sgiexception, constraintviolationexception {    [...] } 

my beans.xml files:

<?xml version="1.0"?> <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://jboss.org/schema/cdi/beans_1_0.xsd" >     <interceptors>         <class>pkg.interceptor.auditinterceptor</class>     </interceptors> </beans>  <!-- empty 1 --> <?xml version="1.0"?> <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://jboss.org/schema/cdi/beans_1_0.xsd" /> 

i hope provided matters.

thanks in advance helping, it's crucial part of application.

glassfish has had problems interceptors being enabled since day one. have no idea if they've fixed yet. way work continue undeploy , redeploy until work :(


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

java - More than one row with the given identifier was found: 1, for class: com.model.Diagnosis -