[jboss-user] [JBoss AOP] - Can't have interceptor element within bind element in AS 5
wolfc
do-not-reply at jboss.com
Thu Oct 2 09:09:09 EDT 2008
The following xml:
<aop xmlns="urn:jboss:aop-beans:1.0">
| <bind pointcut="execution(* org.jboss.ejb3.test.ejbthree1023.AnnotatedLocalBean->woven())">
| <interceptor class="org.jboss.ejb3.test.ejbthree1023.TestInterceptor"/>
| </bind>
| <bind pointcut="execution(* org.jboss.ejb3.test.ejbthree1023.DefaultLocalBean->woven())">
| <interceptor class="org.jboss.ejb3.test.ejbthree1023.TestInterceptor"/>
| </bind>
| </aop>
results in:
org.jboss.xb.binding.JBossXBRuntimeException: {urn:jboss:aop-beans:1.0}interceptor not found as a child of {urn:jboss:aop-beans:1.0}bind
when trying to deploy it on AS 5.
According to the xsd it should be possible.
<xsd:complexType name="bindType">
| <xsd:annotation>
| <xsd:documentation>
| <![CDATA[
| A binding
| ]]>
| </xsd:documentation>
| </xsd:annotation>
| <xsd:choice minOccurs="1" maxOccurs="unbounded">
| <xsd:element name="interceptor" type="aspectOrInterceptorType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="interceptor-ref" type="interceptorRefType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="stack-ref" type="stackRefType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="advice" type="adviceType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="around" type="adviceType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="before" type="beforeType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="after" type="afterType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="throwing" type="throwingType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="finally" type="finallyType" minOccurs="0" maxOccurs="unbounded"/>
| </xsd:choice>
| <xsd:attribute name="name" type="xsd:string" use="optional" />
| <xsd:attribute name="pointcut" type="xsd:string" use="required" />
| <xsd:attribute name="cflow" type="xsd:string" use="optional" />
| </xsd:complexType>
But org.jboss.aop.microcontainer.beans.metadata.BindBeanMetaDataFactory.getInterceptors() doesn't define it as possible.
So should it be possible? Or not?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180022#4180022
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180022
More information about the jboss-user
mailing list