[jboss-cvs] JBossAS SVN: r70416 - projects/ejb3/trunk/core/src/main/resources.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Mar 5 07:30:52 EST 2008


Author: wolfc
Date: 2008-03-05 07:30:52 -0500 (Wed, 05 Mar 2008)
New Revision: 70416

Modified:
   projects/ejb3/trunk/core/src/main/resources/ejb3-interceptors-aop.xml
Log:
EJBTHREE-1174: merged from AS trunk

Modified: projects/ejb3/trunk/core/src/main/resources/ejb3-interceptors-aop.xml
===================================================================
--- projects/ejb3/trunk/core/src/main/resources/ejb3-interceptors-aop.xml	2008-03-05 12:20:28 UTC (rev 70415)
+++ projects/ejb3/trunk/core/src/main/resources/ejb3-interceptors-aop.xml	2008-03-05 12:30:52 UTC (rev 70416)
@@ -78,13 +78,65 @@
    <interceptor class="org.jboss.ejb3.cache.StatefulReplicationInterceptor" scope="PER_VM"/>
    <interceptor factory="org.jboss.ejb3.stateful.StatefulRemoveFactory" scope="PER_CLASS_JOINPOINT"/>
    <interceptor factory="org.jboss.ejb3.tx.TxInterceptorFactory" scope="PER_CLASS_JOINPOINT"/>
-   <interceptor factory="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory" scope="PER_CLASS_JOINPOINT"/>
+   <!-- interceptor factory="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory" scope="PER_CLASS_JOINPOINT"/ -->
    <interceptor factory="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory" scope="PER_CLASS"/>
    <interceptor class="org.jboss.ejb3.AllowedOperationsInterceptor" scope="PER_VM"/>
    <interceptor factory="org.jboss.ejb3.mdb.CurrentMessageInjectorInterceptorFactory" scope="PER_CLASS"/>
    <interceptor class="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor" scope="PER_VM"/>
 
-   <domain name="Stateless Bean">
+   <!--
+         INTERCEPTORS
+     -->
+   
+   <aspect name="InjectInterceptorsFactory" factory="org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory" scope="PER_JOINPOINT"/>
+   <aspect name="InterceptorsFactory" factory="org.jboss.ejb3.interceptors.aop.InterceptorsFactory" scope="PER_INSTANCE"/>
+   <aspect name="InvocationContextInterceptor" class="org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor" scope="PER_VM"/>
+
+   <!-- TODO: this is actually the bootstrap container -->
+   <domain name="Intercepted Bean">
+      <pointcut name="beanAroundInvokeCallbackMethods" expr="execution(* @org.jboss.ejb3.interceptors.ManagedObject->@javax.interceptor.AroundInvoke(..))"/>
+      <pointcut name="beanPostConstructCallbackMethods" expr="execution(* @org.jboss.ejb3.interceptors.ManagedObject->@javax.interceptor.PostConstruct(..))"/>
+      <pointcut name="beanPreDestroyCallbackMethods" expr="execution(* @org.jboss.ejb3.interceptors.ManagedObject->@javax.interceptor.PreDestroy(..))"/>
+      
+      <pointcut name="beanLifecycleCallbackMethods" expr="beanAroundInvokeCallbackMethods OR beanPostConstructCallbackMethods OR beanPreDestroyCallbackMethods"/>
+      
+      <!-- Prepare for dynamic AOP -->
+      <!-- TODO: optimize, we only need managed objects (and interceptors!) to be aspectized -->
+      <!-- prepare expr="all(*) AND has(@org.jboss.ejb3.interceptors.ManagedObject->new(..))"/ -->
+      <!-- TODO: let's see if we can do without 
+      <prepare expr="all(*)"/>
+      -->
+      
+      <!-- Setup AOP interceptors based on spec interceptors -->
+      <bind pointcut="construction(@org.jboss.ejb3.interceptors.ManagedObject->new(..))">
+         <!-- interceptor-ref name="LoggingInterceptor"/ -->
+         <!-- TODO: we don't need invocation context here -->
+         <!-- TODO: we do until we've seperated the post constructs -->
+         <advice name="setup" aspect="InvocationContextInterceptor"/>
+         <advice name="invoke" aspect="InterceptorsFactory"/>
+      </bind>
+      
+      <!-- Lifecycle Event Callbacks (EJB 3 12.4) -->
+      
+      <!-- TODO: for now handled in EJBContainer.invokePostConstruct until injection is refactored 
+      <bind pointcut="construction(@org.jboss.ejb3.interceptors.ManagedObject->new(..))">
+         <advice name="setup" aspect="InvocationContextInterceptor"/>
+         <advice name="postConstruct" aspect="InjectInterceptorsFactory"/>
+      </bind>
+      -->
+      
+      <!-- this is the usual way, now we move it into the other domains 
+      <bind pointcut="execution(* @org.jboss.ejb3.interceptors.ManagedObject->*(..)) AND !beanLifecycleCallbackMethods">
+         <advice name="setup" aspect="InvocationContextInterceptor"/>
+         <advice name="fillMethod" aspect="InvocationContextInterceptor"/>
+         <advice name="aroundInvoke" aspect="InjectInterceptorsFactory"/>
+      </bind>
+      -->
+   </domain>
+   
+   
+   
+   <domain name="Stateless Bean" extends="Intercepted Bean" inheritBindings="true">
       <bind pointcut="execution(public * *->*(..))">
          <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
          <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
@@ -105,7 +157,10 @@
          <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="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/ -->
+         <advice name="setup" aspect="InvocationContextInterceptor"/>
+         <advice name="fillMethod" aspect="InvocationContextInterceptor"/>
+         <advice name="aroundInvoke" aspect="InjectInterceptorsFactory"/>
       </bind>
       <annotation expr="!class(@org.jboss.ejb3.annotation.Pool)">
          @org.jboss.ejb3.annotation.Pool (value="ThreadlocalPool", maxSize=30, timeout=10000)
@@ -115,7 +170,7 @@
       </annotation>
    </domain>
 
-   <domain name="JACC Stateless Bean">
+   <domain name="JACC Stateless Bean" extends="Intercepted Bean" inheritBindings="true">
       <bind pointcut="execution(public * *->*(..))">
          <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
          <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
@@ -136,7 +191,10 @@
          <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="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/ -->
+         <advice name="setup" aspect="InvocationContextInterceptor"/>
+         <advice name="fillMethod" aspect="InvocationContextInterceptor"/>
+         <advice name="aroundInvoke" aspect="InjectInterceptorsFactory"/>
       </bind>
       <annotation expr="!class(@org.jboss.ejb3.annotation.Pool)">
          @org.jboss.ejb3.annotation.Pool (value="ThreadlocalPool", maxSize=30, timeout=10000)
@@ -146,7 +204,7 @@
       </annotation>
    </domain>
 
-   <domain name="Base Stateful Bean">
+   <domain name="Base Stateful Bean" extends="Intercepted Bean" inheritBindings="true">
       <bind pointcut="execution(public * *->*(..))">
          <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
          <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
@@ -183,7 +241,10 @@
       </bind>
 
       <bind pointcut="execution(public * *->*(..))">
-         <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
+         <!-- interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/ -->
+         <advice name="setup" aspect="InvocationContextInterceptor"/>
+         <advice name="fillMethod" aspect="InvocationContextInterceptor"/>
+         <advice name="aroundInvoke" aspect="InjectInterceptorsFactory"/>
       </bind>
 
       <annotation expr="!class(@org.jboss.ejb3.annotation.Pool)">
@@ -215,7 +276,7 @@
       </annotation>
    </domain>
 
-   <domain name="JACC Stateful Bean">
+   <domain name="JACC Stateful Bean" extends="Intercepted Bean" inheritBindings="true">
       <bind pointcut="execution(public * *->*(..))">
          <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
          <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
@@ -245,7 +306,10 @@
       <bind pointcut="execution(public * *->*(..))">
          <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
          <interceptor-ref name="org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor"/>
-         <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
+         <!-- interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/ -->
+         <advice name="setup" aspect="InvocationContextInterceptor"/>
+         <advice name="fillMethod" aspect="InvocationContextInterceptor"/>
+         <advice name="aroundInvoke" aspect="InjectInterceptorsFactory"/>
       </bind>
 
       <bind pointcut="execution(public * @org.jboss.ejb3.annotation.Clustered->*(..)) AND !execution(public * *->@javax.ejb.Remove(..))">
@@ -289,7 +353,7 @@
 
    </domain>
 
-   <domain name="Message Driven Bean">
+   <domain name="Message Driven Bean" extends="Intercepted Bean" inheritBindings="true">
       <bind pointcut="execution(public * *->*(..))">
          <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
          <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
@@ -300,7 +364,10 @@
          <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="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/ -->
+         <advice name="setup" aspect="InvocationContextInterceptor"/>
+         <advice name="fillMethod" aspect="InvocationContextInterceptor"/>
+         <advice name="aroundInvoke" aspect="InjectInterceptorsFactory"/>
       </bind>
       <annotation expr="!class(@org.jboss.ejb3.annotation.Pool)">
          @org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=15, timeout=10000)
@@ -310,7 +377,7 @@
       </annotation>
    </domain>
 
-   <domain name="Consumer Bean">
+   <domain name="Consumer Bean" extends="Intercepted Bean" inheritBindings="true">
       <bind pointcut="execution(public * *->*(..))">
          <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
       </bind>
@@ -324,7 +391,10 @@
          <interceptor-ref name="org.jboss.ejb3.mdb.CurrentMessageInjectorInterceptorFactory"/>
       </bind>
       <bind pointcut="execution(public * *->*(..))">
-         <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
+         <!-- interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/ -->
+         <advice name="setup" aspect="InvocationContextInterceptor"/>
+         <advice name="fillMethod" aspect="InvocationContextInterceptor"/>
+         <advice name="aroundInvoke" aspect="InjectInterceptorsFactory"/>
       </bind>
       <annotation expr="!class(@org.jboss.ejb3.annotation.Pool)">
          @org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=15, timeout=10000)
@@ -334,7 +404,7 @@
       </annotation>
    </domain>
 
-   <domain name="Service Bean">
+   <domain name="Service Bean" extends="Intercepted Bean" inheritBindings="true">
       <bind pointcut="execution(public * *->*(..))">
          <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
          <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
@@ -355,14 +425,17 @@
          <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
       </bind>
       <bind pointcut="execution(public * *->*(..)) AND !execution(* *->create()) AND !execution(* *->start())">
-         <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
+         <!-- interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/ -->
+         <advice name="setup" aspect="InvocationContextInterceptor"/>
+         <advice name="fillMethod" aspect="InvocationContextInterceptor"/>
+         <advice name="aroundInvoke" aspect="InjectInterceptorsFactory"/>
       </bind>
       <annotation expr="!class(@org.jboss.ejb3.annotation.JndiBindingPolicy)">
          @org.jboss.ejb3.annotation.JndiBindingPolicy (policy=org.jboss.ejb3.jndipolicy.impl.PackagingBasedJndiBindingPolicy.class)
       </annotation>
    </domain>
 
-   <domain name="JACC Service Bean">
+   <domain name="JACC Service Bean" extends="Intercepted Bean" inheritBindings="true">
       <bind pointcut="execution(public * *->*(..))">
          <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
          <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
@@ -383,7 +456,10 @@
          <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
       </bind>
       <bind pointcut="execution(public * *->*(..)) AND !execution(* *->create()) AND !execution(* *->start())">
-         <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
+         <!-- interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/ -->
+         <advice name="setup" aspect="InvocationContextInterceptor"/>
+         <advice name="fillMethod" aspect="InvocationContextInterceptor"/>
+         <advice name="aroundInvoke" aspect="InjectInterceptorsFactory"/>
       </bind>
       <annotation expr="!class(@org.jboss.ejb3.annotation.JndiBindingPolicy)">
          @org.jboss.ejb3.annotation.JndiBindingPolicy (policy=org.jboss.ejb3.jndipolicy.impl.PackagingBasedJndiBindingPolicy.class)




More information about the jboss-cvs-commits mailing list