[jboss-cvs] JBossCache/examples/PojoCache/sensor/src ...

Ben Wang bwang at jboss.com
Thu Sep 21 12:12:18 EDT 2006


  User: bwang   
  Date: 06/09/21 12:12:18

  Modified:    examples/PojoCache/sensor/src  jboss-aop.xml
  Log:
  Updated to 2.0 apis
  
  Revision  Changes    Path
  1.2       +147 -2    JBossCache/examples/PojoCache/sensor/src/jboss-aop.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: jboss-aop.xml
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/examples/PojoCache/sensor/src/jboss-aop.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- jboss-aop.xml	5 Feb 2006 06:42:19 -0000	1.1
  +++ jboss-aop.xml	21 Sep 2006 16:12:18 -0000	1.2
  @@ -1,5 +1,130 @@
   <?xml version="1.0" encoding="UTF-8"?>
   <aop>
  +
  +   <!--
  +   This defines the PojoCache 2.0 interceptor stack. Unless necessary, don't modify the stack here!
  +   -->
  +   <!-- Check id range validity -->
  +   <interceptor name="CheckId" class="org.jboss.cache.pojo.interceptors.CheckIdInterceptor" scope="PER_INSTANCE"/>
  +   <!-- Track Tx undo operation -->
  +   <interceptor name="Undo" class="org.jboss.cache.pojo.interceptors.PojoTxUndoInterceptor" scope="PER_INSTANCE"/>
  +   <!-- Begining -->
  +   <interceptor name="Start" class="org.jboss.cache.pojo.interceptors.PojoBeginInterceptor" scope="PER_INSTANCE"/>
  +   <!-- Check if we need a local tx for batch processing -->
  +   <interceptor name="Tx" class="org.jboss.cache.pojo.interceptors.PojoTxInterceptor" scope="PER_INSTANCE"/>
  +   <!-- Mockup failed tx for testing -->
  +   <interceptor name="MockupTx" class="org.jboss.cache.pojo.interceptors.PojoFailedTxMockupInterceptor" scope="PER_INSTANCE"/>
  +   <!-- Perform parent level node locking -->
  +   <interceptor name="TxLock" class="org.jboss.cache.pojo.interceptors.PojoTxLockInterceptor" scope="PER_INSTANCE"/>
  +   <!-- Interceptor to perform Pojo level rollback -->
  +   <interceptor name="TxUndo" class="org.jboss.cache.pojo.interceptors.PojoTxUndoSynchronizationInterceptor"
  +                scope="PER_INSTANCE"/>
  +   <!-- Interceptor to perform Pojo level rollback -->
  +   <interceptor name="Reentrant" class="org.jboss.cache.pojo.interceptors.MethodReentrancyStopperInterceptor"
  +                scope="PER_INSTANCE"/>
  +   <!-- Whether to allow non-serializable pojo -->
  +   <interceptor name="MarshallNonSerializable" class="org.jboss.cache.pojo.interceptors.CheckNonSerializableInterceptor"
  +                scope="PER_INSTANCE">
  +         <attribute name="marshallNonSerializable">false</attribute>
  +                </interceptor>
  +
  +   <stack name="Attach">
  +      <interceptor-ref name="Start"/>
  +      <interceptor-ref name="CheckId"/>
  +      <interceptor-ref name="MarshallNonSerializable"/>
  +      <interceptor-ref name="Tx"/>
  +      <!-- NOTE: Comment this out during production!! MockupTx is for testing only. -->
  +      <interceptor-ref name="MockupTx"/>
  +      <interceptor-ref name="TxLock"/>
  +      <interceptor-ref name="TxUndo"/>
  +   </stack>
  +
  +   <stack name="Detach">
  +      <interceptor-ref name="Start"/>
  +      <interceptor-ref name="CheckId"/>
  +      <interceptor-ref name="Tx"/>
  +      <!-- NOTE: Comment this out during production!! MockupTx is for testing only. -->
  +      <interceptor-ref name="MockupTx"/>
  +      <interceptor-ref name="TxLock"/>
  +      <interceptor-ref name="TxUndo"/>
  +   </stack>
  +
  +   <stack name="Find">
  +      <interceptor-ref name="Start"/>
  +      <interceptor-ref name="CheckId"/>
  +   </stack>
  +
  +   <!--
  +   The following section should be READ-ONLY!!
  +   -->
  +   <!-- This bind the jointpoint to specific in-memory operations. Currently in PojoUtil. -->
  +   <bind pointcut="execution(*
  +      @org.jboss.cache.pojo.annotation.Reentrant->toString())">
  +      <interceptor-ref name="Reentrant"/>
  +   </bind>
  +
  +   <bind pointcut="execution(*
  +      org.jboss.cache.pojo.PojoUtil->@org.jboss.cache.pojo.annotation.TxUndo(..))">
  +      <interceptor-ref name="Undo"/>
  +   </bind>
  +
  +   <bind pointcut="execution(* org.jboss.cache.pojo.impl.PojoCacheImpl->@org.jboss.cache.pojo.annotation.Attach(..))">
  +      <stack-ref name="Attach"/>
  +   </bind>
  +
  +   <bind pointcut="execution(* org.jboss.cache.pojo.impl.PojoCacheImpl->@org.jboss.cache.pojo.annotation.Detach(..))">
  +      <stack-ref name="Detach"/>
  +   </bind>
  +
  +   <bind pointcut="execution(* org.jboss.cache.pojo.impl.PojoCacheImpl->@org.jboss.cache.pojo.annotation.Find(..))">
  +      <stack-ref name="Find"/>
  +   </bind>
  +
  +
  +   <!-- This is declaration file for JDK50 annotation.
  +        Idea is user will then need only to annotate like:
  +        @org.jboss.cache.pojo.annotation.PojoCacheable
  +        in his POJO. There will be no need of jboss-aop.xml from user's side.
  +
  +        For example, see either Address or Person.
  +   -->
  +
  +   <!-- PojoCache 2.0 style -->
  +   <!-- If a POJO has PojoCachable annotation, it will be asepctized. -->
  +   <prepare expr="field(* @org.jboss.cache.pojo.annotation.PojoCacheable->*)" />
  +
  +   <!--
  +   Supports inheritance and polymorphism. It can either be a concrete class
  +   or an interface. All sub-classes or interface implementors will be instrumeneted.
  +   -->
  +   <prepare expr="field(* $instanceof{@org.jboss.cache.pojo.annotation.InstanceOfPojoCacheable}->*)" />
  +
  +   <!-- Observer and Observable to monitor field modification -->
  +   <bind pointcut="
  +      set(* $instanceof{@org.jboss.cache.pojo.annotation.InstanceOfPojoCacheable}->*) OR
  +      set(* @org.jboss.cache.pojo.annotation.PojoCacheable->*)
  +      ">
  +         <interceptor class="org.jboss.cache.pojo.observable.SubjectInterceptor"/>
  +   </bind>
  +
  +   <introduction class="$instanceof{@org.jboss.cache.pojo.annotation.InstanceOfPojoCacheable}">
  +      <mixin>
  +         <interfaces>org.jboss.cache.pojo.observable.Subject</interfaces>
  +         <class>org.jboss.cache.pojo.observable.SubjectImpl</class>
  +         <construction>new org.jboss.cache.pojo.observable.SubjectImpl(this)</construction>
  +      </mixin>
  +   </introduction>
  +
  +   <introduction class="@org.jboss.cache.pojo.annotation.PojoCacheable">
  +      <mixin>
  +         <interfaces>org.jboss.cache.pojo.observable.Subject</interfaces>
  +         <class>org.jboss.cache.pojo.observable.SubjectImpl</class>
  +         <construction>new org.jboss.cache.pojo.observable.SubjectImpl(this)</construction>
  +      </mixin>
  +   </introduction>
  +
  +
  +   <!-- PojoCache 1.4. Is deprecated. Will be removed in 2.1 release -->
      <!-- This is declaration file for annotation. We are using JDK1.4 now,
           so an annotationc pre-compiler is needed for JBossAop. 
           See build.xml target annoc for details.
  @@ -17,7 +142,27 @@
   
      <!--
      Supports inheritance and polymorphism. It can either be a concrete class
  -   or an interface. All sub-classes or interface implementors will be instrumeneted.
  +   or an interface. All sub-classes or intrface implementors will be instrumeneted.
      -->
      <prepare expr="field(* $instanceof{@org.jboss.cache.aop.InstanceOfAopMarker}->*)" />
  +
  +
  +   <!-- This is declaration file for JDK50 annotation.
  +        Idea is user will then need only to annotate like:
  +        @org.jboss.cache.aop.annotation.PojoCacheable
  +        in his POJO. There will be no need of jboss-aop.xml from user's side.
  +
  +        For example, see either Address or Person.
  +   -->
  +
  +   <!-- If a POJO has PojoCachable annotation, it will be asepctized. -->
  +   <prepare expr="field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)" />
  +
  +   <!--
  +   Supports inheritance and polymorphism. It can either be a concrete class
  +   or an interface. All sub-classes or interface implementors will be instrumeneted.
  +   -->
  +   <prepare expr="field(* $instanceof{@org.jboss.cache.aop.annotation.InstanceOfPojoCacheable}->*)" />
  +
  +
   </aop>
  
  
  



More information about the jboss-cvs-commits mailing list