11 Replies Latest reply on Jan 31, 2008 8:13 AM by Ales Justin

    ManagedObject stuff for AOP

    Kabir Khan Master

      Hi Scott,

      Following from the chat we had in Neuchatel, I am looking at making the full -aop.xml contents deployable as beans. I am not 100% sure if it will be possible yet, but am looking into it.

      To refresh my memory, could you please let me know the sort of things you would like to view/tweak in the admin console?

        • 1. Re: ManagedObject stuff for AOP
          Scott Stark Master

          Container configuration type settings like those used by ejb3:

          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE aop PUBLIC
           "-//JBoss//DTD JBOSS AOP 1.0//EN"
           "http://labs.jboss.com/portal/jbossaop/dtd/jboss-aop_1_0.dtd">
          
          <aop>
           <interceptor class="org.jboss.aspects.remoting.InvokeRemoteInterceptor" scope="PER_VM"/>
           <interceptor class="org.jboss.aspects.security.SecurityClientInterceptor" scope="PER_VM"/>
           <interceptor class="org.jboss.aspects.tx.ClientTxPropagationInterceptor" scope="PER_VM"/>
           <interceptor class="org.jboss.ejb3.remoting.IsLocalInterceptor" scope="PER_VM"/>
           <interceptor class="org.jboss.ejb3.remoting.ClusteredIsLocalInterceptor" scope="PER_VM"/>
           <interceptor class="org.jboss.aspects.remoting.ClusterChooserInterceptor" scope="PER_VM"/>
          
           <interceptor class="org.jboss.aspects.tx.TxPropagationInterceptor" scope="PER_VM"/>
          
           <stack name="ServiceClientInterceptors">
           <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
           </stack>
          
           <stack name="AsynchronousStatelessSessionClientInterceptors">
           <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
           </stack>
          
           <stack name="AsynchronousStatefulSessionClientInterceptors">
           <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
           </stack>
          
           <stack name="StatelessSessionClientInterceptors">
           <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
           </stack>
          
           <stack name="StatefulSessionClientInterceptors">
           <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
           </stack>
          
           <stack name="ClusteredStatelessSessionClientInterceptors">
           <interceptor-ref name="org.jboss.ejb3.remoting.ClusteredIsLocalInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.remoting.ClusterChooserInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
           </stack>
          
           <stack name="ClusteredStatefulSessionClientInterceptors">
           <interceptor-ref name="org.jboss.ejb3.remoting.ClusteredIsLocalInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.remoting.ClusterChooserInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
           </stack>
          
           <interceptor class="org.jboss.ejb3.asynchronous.AsynchronousInterceptor" scope="PER_CLASS"/>
           <interceptor class="org.jboss.ejb3.ENCPropagationInterceptor" scope="PER_VM"/>
           <interceptor name="Basic Authorization" factory="org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorFactory" scope="PER_CLASS"/>
           <interceptor name="JACC Authorization" factory="org.jboss.ejb3.security.JaccAuthorizationInterceptorFactory" scope="PER_CLASS"/>
           <interceptor factory="org.jboss.ejb3.security.AuthenticationInterceptorFactory" scope="PER_CLASS"/>
           <interceptor factory="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory" scope="PER_CLASS"/>
           <interceptor class="org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor" scope="PER_VM"/>
           <interceptor class="org.jboss.ejb3.stateless.StatelessInstanceInterceptor" scope="PER_VM"/>
           <interceptor class="org.jboss.ejb3.stateful.StatefulInstanceInterceptor" scope="PER_VM"/>
           <interceptor class="org.jboss.ejb3.stateful.SessionSynchronizationInterceptor" scope="PER_VM"/>
           <interceptor class="org.jboss.ejb3.service.ServiceSingletonInterceptor" scope="PER_VM"/>
           <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.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">
           <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 * *->*(..))">
           <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"/>
           </bind>
           <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
           @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
           </annotation>
           <annotation expr="!class(@org.jboss.annotation.ejb.JndiBindingPolicy)">
           @org.jboss.annotation.ejb.JndiBindingPolicy (policy=org.jboss.ejb3.jndipolicy.PackagingBasedJndiBindingPolicy.class)
           </annotation>
           </domain>
          
           <domain name="JACC 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="JACC Authorization"/>
           </bind>
           <bind pointcut="execution(public * *->*(..))">
           <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"/>
           </bind>
           <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
           @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
           </annotation>
           <annotation expr="!class(@org.jboss.annotation.ejb.JndiBindingPolicy)">
           @org.jboss.annotation.ejb.JndiBindingPolicy (policy=org.jboss.ejb3.jndipolicy.PackagingBasedJndiBindingPolicy.class)
           </annotation>
           </domain>
          
           <domain name="Base Stateful 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 * *->*(..))">
           <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 * *->@javax.ejb.Remove(..))">
           <interceptor-ref name="org.jboss.ejb3.stateful.StatefulRemoveFactory"/>
           </bind>
           <bind pointcut="execution(public * *->*(..))">
           <interceptor-ref name="org.jboss.ejb3.stateful.StatefulInstanceInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/>
           <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
           <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
           </bind>
           <bind pointcut="execution(public * $instanceof{javax.ejb.SessionSynchronization}->*(..))">
           <interceptor-ref name="org.jboss.ejb3.stateful.SessionSynchronizationInterceptor"/>
           </bind>
           <bind pointcut="execution(public * *->*(..))">
           <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
           <interceptor-ref name="org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor"/>
           </bind>
          
           <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..)) AND !execution(public * *->@javax.ejb.Remove(..))">
           <interceptor-ref name="org.jboss.ejb3.cache.StatefulReplicationInterceptor"/>
           </bind>
          
           <bind pointcut="execution(public * *->*(..))">
           <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
           </bind>
          
           <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
           @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
           </annotation>
           <annotation expr="!class(@org.jboss.annotation.ejb.JndiBindingPolicy)">
           @org.jboss.annotation.ejb.JndiBindingPolicy (policy=org.jboss.ejb3.jndipolicy.PackagingBasedJndiBindingPolicy.class)
           </annotation>
           </domain>
          
           <domain name="Stateful Bean" extends="Base Stateful Bean" inheritBindings="true">
           <!-- NON Clustered cache configuration -->
           <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND !class(@org.jboss.annotation.ejb.Clustered)">
           @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.simple.SimpleStatefulCache.class)
           </annotation>
           <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.PersistenceManager) AND !class(@org.jboss.annotation.ejb.Clustered)">
           @org.jboss.annotation.ejb.cache.simple.PersistenceManager (org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.class)
           </annotation>
           <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.CacheConfig) AND !class(@org.jboss.annotation.ejb.Clustered)">
           @org.jboss.annotation.ejb.cache.simple.CacheConfig (maxSize=100000, idleTimeoutSeconds=300, removalTimeoutSeconds=0)
           </annotation>
          
           <!-- Clustered cache configuration -->
           <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND class(@org.jboss.annotation.ejb.Clustered)">
           @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.tree.StatefulTreeCache.class)
           </annotation>
           <annotation expr="!class(@org.jboss.annotation.ejb.cache.tree.CacheConfig) AND class(@org.jboss.annotation.ejb.Clustered)">
           @org.jboss.annotation.ejb.cache.tree.CacheConfig (name="jboss.cache:service=EJB3SFSBClusteredCache", maxSize=100000, idleTimeoutSeconds=300, removalTimeoutSeconds=0)
           </annotation>
           </domain>
          
           <domain name="JACC Stateful 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="JACC Authorization"/>
           </bind>
           <bind pointcut="execution(public * *->*(..))">
           <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 * *->@javax.ejb.Remove(..))">
           <interceptor-ref name="org.jboss.ejb3.stateful.StatefulRemoveFactory"/>
           </bind>
           <bind pointcut="execution(public * *->*(..))">
           <interceptor-ref name="org.jboss.ejb3.stateful.StatefulInstanceInterceptor"/>
           <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/>
           <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
           <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
           </bind>
           <bind pointcut="execution(public * $instanceof{javax.ejb.SessionSynchronization}->*(..))">
           <interceptor-ref name="org.jboss.ejb3.stateful.SessionSynchronizationInterceptor"/>
           </bind>
           <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"/>
           </bind>
          
           <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..)) AND !execution(public * *->@javax.ejb.Remove(..))">
           <interceptor-ref name="org.jboss.ejb3.cache.StatefulReplicationInterceptor"/>
           </bind>
           <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
           @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
           </annotation>
           <annotation expr="!class(@org.jboss.annotation.ejb.JndiBindingPolicy)">
           @org.jboss.annotation.ejb.JndiBindingPolicy (policy=org.jboss.ejb3.jndipolicy.PackagingBasedJndiBindingPolicy.class)
           </annotation>
          
           <!-- NON Clustered cache configuration -->
           <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND !class(@org.jboss.annotation.ejb.Clustered)">
           @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.simple.SimpleStatefulCache.class)
           </annotation>
           <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.PersistenceManager) AND !class(@org.jboss.annotation.ejb.Clustered)">
           @org.jboss.annotation.ejb.cache.simple.PersistenceManager (org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.class)
           </annotation>
           <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.CacheConfig) AND !class(@org.jboss.annotation.ejb.Clustered)">
           @org.jboss.annotation.ejb.cache.simple.CacheConfig (maxSize=100000, idleTimeoutSeconds=300, removalTimeoutSeconds=0)
           </annotation>
          
           <!-- Clustered cache configuration -->
           <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND class(@org.jboss.annotation.ejb.Clustered)">
           @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.tree.StatefulTreeCache.class)
           </annotation>
           <annotation expr="!class(@org.jboss.annotation.ejb.cache.tree.CacheConfig) AND class(@org.jboss.annotation.ejb.Clustered)">
           @org.jboss.annotation.ejb.cache.tree.CacheConfig (name="jboss.cache:service=EJB3SFSBClusteredCache", maxSize=100000, idleTimeoutSeconds=300, removalTimeoutSeconds=0)
           </annotation>
           </domain>
          
           <domain name="Embedded Stateful Bean" extends="Base Stateful Bean" inheritBindings="true">
           <!-- NON Clustered cache configuration -->
           <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache)">
           @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.NoPassivationCache.class)
           </annotation>
           <annotation expr="!class(@org.jboss.annotation.ejb.JndiBindingPolicy)">
           @org.jboss.annotation.ejb.JndiBindingPolicy (policy=org.jboss.ejb3.jndipolicy.PackagingBasedJndiBindingPolicy.class)
           </annotation>
          
           </domain>
          
           <domain name="Message Driven Bean">
           <bind pointcut="execution(public * *->*(..))">
           <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
           <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
           </bind>
           <!-- TODO: Authorization? -->
           <bind pointcut="execution(public * *->*(..))">
           <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/>
           <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"/>
           </bind>
           <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
           @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=15, timeout=10000)
           </annotation>
           <annotation expr="!class(@org.jboss.annotation.ejb.JndiBindingPolicy)">
           @org.jboss.annotation.ejb.JndiBindingPolicy (policy=org.jboss.ejb3.jndipolicy.PackagingBasedJndiBindingPolicy.class)
           </annotation>
           </domain>
          
           <domain name="Consumer Bean">
           <bind pointcut="execution(public * *->*(..))">
           <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
           </bind>
           <bind pointcut="execution(public * *->*(..))">
           <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/>
           <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
           <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
           <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
           </bind>
           <bind pointcut="execution(public * *->*(..)) AND (has(* *->@org.jboss.annotation.ejb.CurrentMessage(..)) OR hasfield(* *->@org.jboss.annotation.ejb.CurrentMessage))">
           <interceptor-ref name="org.jboss.ejb3.mdb.CurrentMessageInjectorInterceptorFactory"/>
           </bind>
           <bind pointcut="execution(public * *->*(..))">
           <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
           </bind>
           <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
           @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=15, timeout=10000)
           </annotation>
           <annotation expr="!class(@org.jboss.annotation.ejb.JndiBindingPolicy)">
           @org.jboss.annotation.ejb.JndiBindingPolicy (policy=org.jboss.ejb3.jndipolicy.PackagingBasedJndiBindingPolicy.class)
           </annotation>
           </domain>
          
           <domain name="Service Bean">
           <bind pointcut="execution(public * *->*(..))">
           <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
           <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
           </bind>
           <bind pointcut="!execution(* *->create()) AND !execution(* *->start()) AND !execution(*->new(..))">
           <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 * *->*(..))">
           <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
           </bind>
           <bind pointcut="execution(public * *->*(..))">
           <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"/>
           </bind>
           <bind pointcut="execution(public * *->*(..)) AND !execution(* *->create()) AND !execution(* *->start())">
           <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
           </bind>
           <annotation expr="!class(@org.jboss.annotation.ejb.JndiBindingPolicy)">
           @org.jboss.annotation.ejb.JndiBindingPolicy (policy=org.jboss.ejb3.jndipolicy.PackagingBasedJndiBindingPolicy.class)
           </annotation>
           </domain>
          
           <domain name="JACC Service Bean">
           <bind pointcut="execution(public * *->*(..))">
           <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
           <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
           </bind>
           <bind pointcut="!execution(* *->create()) AND !execution(* *->start()) AND !execution(*->new(..))">
           <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 * *->*(..))">
           <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
           </bind>
           <bind pointcut="execution(public * *->*(..))">
           <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"/>
           </bind>
           <bind pointcut="execution(public * *->*(..)) AND !execution(* *->create()) AND !execution(* *->start())">
           <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
           </bind>
           <annotation expr="!class(@org.jboss.annotation.ejb.JndiBindingPolicy)">
           @org.jboss.annotation.ejb.JndiBindingPolicy (policy=org.jboss.ejb3.jndipolicy.PackagingBasedJndiBindingPolicy.class)
           </annotation>
           </domain>
          </aop>
          



          • 2. Re: ManagedObject stuff for AOP
            Kabir Khan Master

            I am in the process of writing the underlying MC beans. They are quite similar to the old ones, but do contain some changes. Ideally, I would like to be able to:

            1) Replace the "old" underlying beans with my new ones. I don't want to have to maintain two versions of this.

            2) Replace the current use-case xml (i.e. aop:aspect) with something more similar to what goes in a jboss-aop.xml file. Alternatively, I could modify the existing AOPBeansSchemaInitializer to use the "new" underlying beans, and create a new SchemaBindingInitializer to parse the "new" use-case.xml.

            Thoughts?

            • 3. Re: ManagedObject stuff for AOP
              Kabir Khan Master

              Scott/Adrain,

              I have almost completed the underlying beans to do this, but need some answers for my previous post to be able to progress.

              1) Am I ok to replace the old underlying beans with my existing ones?

              2) Can I rip out the old <aop:aspect> xml stuff, and replace it with something that looks more like -aop.xml? Or do I create a new schema and keep the old <aop:aspect> stuff?

              • 4. Re: ManagedObject stuff for AOP
                Adrian Brock Master

                 

                "kabir.khan@jboss.com" wrote:
                Scott/Adrain,

                I have almost completed the underlying beans to do this, but need some answers for my previous post to be able to progress.

                1) Am I ok to replace the old underlying beans with my existing ones?


                Yes they are only prototypes that I wrote a couple of years ago to test the concept.
                Obviously it is upto the aop project to define these, not me. ;-)


                2) Can I rip out the old <aop:aspect> xml stuff, and replace it with something that looks more like -aop.xml? Or do I create a new schema and keep the old <aop:aspect> stuff?[


                As long as the documentation and users get updated to the new config
                this doesn't matter - it's never been in a GA release.

                Currently I think only the jboss-jca prototype project to use AOP
                and appserver 5 is using it besides the mc-aop-int tests and mc examples?

                • 5. Re: ManagedObject stuff for AOP
                  Adrian Brock Master

                   

                  "kabir.khan@jboss.com" wrote:
                  AOPBeansSchemaInitializer to use the "new" underlying beans, and create a new SchemaBindingInitializer to parse the "new" use-case.xml.


                  You probably want to look at the JBossXB annotation based parsing?

                  But that would require the MC being updated to also do that.
                  The MC based annotation parsing is prototyped in the JBossXB testsuite
                  so speak to Ales about getting it ported.

                  The annotation approach has one big advantage which is that
                  it is a lot easier to include other people's metadata classes in your models.

                  The metadata (e.g. MC's properties) inherits the namespace of the top level
                  element/class defining the schema.

                  e.g. Something like

                  @JBossXmlSchema("urn:jboss-aop:2.0")
                  public class Aspect
                  {
                   @XmlElement(name="property")
                   public void setProperties(Collection<org.jboss.metadata.spi.PropertyMetaData> properties);
                  }
                  


                  Will define an {urn:jboss-aop:2.0}:property so no need to play about with
                  (hack) namespaces like in the old approach. :-)

                  • 7. Re: ManagedObject stuff for AOP
                    Adrian Brock Master

                     

                    "adrian@jboss.org" wrote:

                    But that would require the MC being updated to also do that.
                    The MC based annotation parsing is prototyped in the JBossXB testsuite
                    so speak to Ales about getting it ported.


                    This is here:
                    http://viewvc.jboss.org/cgi-bin/viewvc.cgi/common/jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/

                    • 8. Re: ManagedObject stuff for AOP
                      Ales Justin Master

                       

                      "adrian@jboss.org" wrote:
                      This is here:
                      http://viewvc.jboss.org/cgi-bin/viewvc.cgi/common/jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/


                      If you can create a MC JIRA issue, I'll have a crack at this after my current MC issues/bugz.

                      • 10. Re: ManagedObject stuff for AOP
                        Kabir Khan Master

                        I have most of this working, but need a bit of guidance on where to take it further.

                        The way it currently works is that you deploy similar xml to -aop.xml in a -beans.xml, for example:

                        <deployment xmlns="urn:jboss:bean-deployer:2.0">
                        
                         <bean name="AspectManager" class="org.jboss.aop.AspectManager">
                         <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
                         </bean>
                        
                         <interceptor xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestInterceptor"/>
                        
                         <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.POJO->*(..))">
                         <interceptor-ref name="org.jboss.test.microcontainer.beans.TestInterceptor"/>
                         </bind>
                        
                         <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
                        
                        </deployment>
                        


                        More examples can be found in http://anonsvn.jboss.org/repos/jbossas/projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/. The *BeansTestCase.xml files show the underlying beans, while the *AopTestCase.xml files show the -aop.xml style configuration.

                        1) Am I ok using -beans.xml files for this? Or should I be using -aop.xml? If so, how do the -aop.xml files get recognised by the deployer that deploys -beans.xml files? I think that means scrapping the AspectDeployer?

                        2) I will probably need to do something similar for aspects configured via annotations. So we might need the AspectDeployer anyway. I should be able to easily create the BeanMetaDataFactory from the annotations, but what would the entry point of getting these beans into the MC be?

                        3) Is adding the ManagedObject/Operation stuff my task? How do I test that I am exposing the right stuff?

                        4) With the current xml it is by default looking for an org.jboss.aop.AspectManager called "AspectManager" (as shown in the example above), in AS 5 this does not exist, so instead we need to do (from http://anonsvn.jboss.org/repos/jbossas/trunk/testsuite/src/resources/aop/mcdefaultannotation/META-INF/jboss-beans.xml:
                        <deployment xmlns="urn:jboss:bean-deployer:2.0">
                        
                         <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
                         name="DependencyAdvice"
                         class="org.jboss.test.aop.mcdefaultannotation.AnnotationReaderInterceptor"
                         manager-bean="AspectManager"
                         manager-property="aspectManager">
                         </aop:aspect>
                        
                         <aop:bind xmlns:aop="urn:jboss:aop-beans:1.0"
                         pointcut="execution(* @org.jboss.test.aop.mcdefaultannotation.TestAnnotation->getAnnotationValue())"
                         manager-bean="AspectManager"
                         manager-property="aspectManager">
                         <aop:interceptor-ref name="DependencyAdvice"/>
                         </aop:bind>
                        ...
                        </deployment>
                        


                        i.e. we need to specify the manager-bean and manager-property attributes, which isn't ideal. I'd like to configure the name of where to find this somehow, maybe at the deployer level? Alternatively, something like:

                        <deployment xmlns="urn:jboss:bean-deployer:2.0">
                         <aop:manager name="AspectManager" property="aspectManager"/>
                         <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
                         name="DependencyAdvice"
                         class="org.jboss.test.aop.mcdefaultannotation.AnnotationReaderInterceptor">
                         </aop:aspect>
                        
                         <aop:bind xmlns:aop="urn:jboss:aop-beans:1.0"
                         pointcut="execution(* @org.jboss.test.aop.mcdefaultannotation.TestAnnotation->getAnnotationValue())">
                         <aop:interceptor-ref name="DependencyAdvice"/>
                         </aop:bind>
                        ...
                        </deployment>
                        



                        • 11. Re: ManagedObject stuff for AOP
                          Ales Justin Master

                           

                          "kabir.khan@jboss.com" wrote:

                          1) Am I ok using -beans.xml files for this? Or should I be using -aop.xml? If so, how do the -aop.xml files get recognised by the deployer that deploys -beans.xml files? I think that means scrapping the AspectDeployer?

                          2) I will probably need to do something similar for aspects configured via annotations. So we might need the AspectDeployer anyway. I should be able to easily create the BeanMetaDataFactory from the annotations, but what would the entry point of getting these beans into the MC be?

                          http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124836