[jboss-user] [EJB 3.0] - Re: Implementing an EJB3 Interceptor without touching the pr

Haensel do-not-reply at jboss.com
Wed Apr 11 01:59:52 EDT 2007


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 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036217#4036217

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036217



More information about the jboss-user mailing list