[jboss-jira] [JBoss JIRA] Closed: (JBAOP-340) Enable chain overriding for container proxies

Kabir Khan (JIRA) jira-events at jboss.com
Wed Jan 17 20:16:58 EST 2007


     [ http://jira.jboss.com/jira/browse/JBAOP-340?page=all ]

Kabir Khan closed JBAOP-340.
----------------------------

    Resolution: Done
      Assignee: Kabir Khan

> Enable chain overriding for container proxies
> ---------------------------------------------
>
>                 Key: JBAOP-340
>                 URL: http://jira.jboss.com/jira/browse/JBAOP-340
>             Project: JBoss AOP
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 2.0.0.alpha2, 1.5.2.GA
>            Reporter: Kabir Khan
>         Assigned To: Kabir Khan
>             Fix For: 1.5.3.GA, 2.0.0.alpha3
>
>
> This is needed for EJB 3
> It's actually like this:
> class Parent
> {
>    void method(){}
> }
> @Stateful
> @Clustered
> class Child extends Parent
> {
>    // no methods - all are inherited from Parent }
> Child.method() is not intercepted when the pointcut is based on the @Clustered annotation. But it is intercepted by any interceptors with the following binding. 
> <bind pointcut="execution(public * *->*(..))">
>          <interceptor-ref name="XYZInterceptor"/>
>       </bind>
> It's seems that since the method is defined in the Parent and inherited by the Child, but the annotation is in Child, that the interceptor is not included.
> Thanks -Bill
> -----Original Message-----
> From: Kabir Khan
> Sent: Thursday, January 11, 2007 9:05 AM
> To: Bill Decoste
> Subject: RE: annotations on parent class 
> Hmm,
>  
> If you have
>  
> class Parent
> {
>    void parentMethod(){}
> }
> @Stateful
> @Clustered
> class Child extends Parent
> {
>    void childMethod(){}
> }
> do any of these get intercepted for you? My guess is that childMethod() would and parentMethod() doesn't. And you would like parentMethod() as well?
> Kabir
> ________________________________
> 	From: Bill Decoste [mailto:bill.decoste at jboss.com] 
> 	Sent: 11 January 2007 16:33
> 	To: Kabir Khan
> 	Subject: RE: annotations on parent class 
> 	
> 	
> 	Sorry, I wasn't clear. Here is the scenario. When we deploy the Child class, the @Clustered annotation is not being recognized so when calls to the SFSB Child are made, the StatefulTestInterceptor is not invoked.
> If I
> annotate Parent with @Clustered, it works properly. Just want to make sure this isn't a known issue in AOP.
> 	 
> 	Thanks - Bill
> 	 
> 	class Parent
> 	{
> 	 ..
> 	}
> 	 
> 	 
> 	@Stateful
> 	@Clustered
> 	class Child extends Parent
> 	{
> 	.
> 	}
> 	 
> 	________________________________
> 		From: Kabir Khan 
> 	Sent: Wednesday, January 10, 2007 4:53 PM
> 	To: Bill Decoste
> 	Subject: RE: annotations on parent class 
> 	 
> 	The "class-part" of the method expression does an exact match on if the class declaring the method has been annotated. Changing it to the following should yield the correct results:
> 	 
> 	<bind pointcut="execution(public *
> $instanceof{@jboss.annotation.ejb.Clustered
> <mailto:$instanceof%7b at jboss.annotation.ejb.Clustered> }->*(..))">
> 	   <interceptor-ref
> name="org.jboss.ejb3.stateful.StatefulTestInterceptor"/>
> 	</bind>
> 	 
> 	 
> 	 
> 	 
> 		________________________________
> 				From: Bill Decoste
> [mailto:bill.decoste at jboss.com] 
> 		Sent: 10 January 2007 23:33
> 		To: Kabir Khan
> 		Subject: annotations on parent class 
> 		Hi Kabir,
> 		 
> 		Got an aop question for you . we've got an unannotated parent class and a sublass with a @Clustered annotation. Here's a snippet from aop.xml:
> 		 
> 		<bind pointcut="execution(public *
> @jboss.annotation.ejb.Clustered->*(..))">
> 		   <interceptor-ref
> name="org.jboss.ejb3.stateful.StatefulTestInterceptor"/>
> 		</bind>
> 		 
> 		When the subclass is invoked, the
> StatefulTestInterceptor is
> not in the stack - all of the other interceptors work properly. The aop package is not finding the @Clustered in the subclass, so it's not adding the interceptor. 
> 		 
> 		Is this a known issue?
> 		 
> 		Thanks
> 		 
> 		 
> 		Bill DeCoste
> 		JBoss, a division of Red Hat
> 		bill.decoste at jboss.com
> 		 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list