JBoss.org Community Documentation

13.3. Binding Advices to array element access

To bind advices to the access of array elements, you use a arraybind element. It binds advices to all arrays woven for array access. You can use the type attribute to specify if you want the interception to take place when setting elements in the array, getting elements from the array, or both. Valid values for the type attribute are: READ_WRITE, READ_ONLY and WRITE_ONLY. An example is shown below:

    
   <interceptor class="org.acme.TestInterceptor"/>
   <arraybind type="READ_ONLY">
      <interceptor-ref name="org.acme.TestInterceptor"/>
   </arraybind>

         

arraybind currently only supports interceptor-ref and advice as child elements. before, after, throwing and finally are not yet supported for array interception. for arrays.