This content has been marked as final.
Show 2 replies
-
1. Re: Implementing an EJB3 Interceptor without touching the pr
bdecoste Apr 5, 2007 2:46 PM (in response to haensel)If you add the interceptor as a default for all beans of a certain type by modifying ejb3-interceptors-aop.xml, then you need the interceptor class to be globally loadable by all ejb3s (in server/XXX/lib as you did or in the deployers/ejb3.deployer directory).
Can you paste the changes you have made to ejb3-interceptors-aop.xml? -
2. Re: Implementing an EJB3 Interceptor without touching the pr
haensel Apr 11, 2007 1:59 AM (in response to haensel)Heya,
thank you so much for your reply.
The changes I made for my ejb3 Inteceptor looks like this:<interceptor class="haensl.ejb3interceptors.MyDefaultInterceptor" scope="PER_CLASS"/> <domain name="Stateless Bean"> <bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/> <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/> <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/> </bind> <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))"> <interceptor-ref name="Basic Authorization"/> </bind> <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))"> <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/> </bind> <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..))"> <interceptor-ref name="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory"/> </bind> <bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/> <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/> <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/> <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/> <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/> <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/> <!--interceptor-ref name="haensl.ejb3interceptors.MyDefaultInterceptor"/ --> </bind>
For loading this interceptor by all ejbs which are deployed on the server I just have to copy my .jar file with the interceptor to the lib folder of the server ?
It still doesnt work that way.
And with deployment descriptors I only worked so far that I know that I have to add them to the target projects which needed to be intercepted.
But by this I have to "touch" those projects. And that is not my intention.
Or is there some kind of "global deployment descriptor folder" in the server structure ?
Thank you so much,
Hans