This content has been marked as final.
Show 2 replies
-
1. Re: Normal SFSB Business Methods named
alrubinger Dec 12, 2008 4:35 PM (in response to alrubinger)OK, I can't fix this in AOP, even by extracting and overriding the hashing scheme.
ClassAdvisor registers methods by the bean impl class:Putting advised method: -956421528 / public int org.jboss.ejb3.core.test.stateful.StatefulBean.getNextCounter()
While we determine invoked method by interface:Method called: org.jboss.ejb3.core.test.stateful.StatefulLocalBusiness: org.jboss.ejb3.core.test.stateful.StatefulCommonBusiness.getNextCounter() 16:19:59,161 WARN [SessionSpecContainer] Method Hash used: 1793199750
When I throw in a hashing function that takes declaring class into account, then this will not be equal. No method will match.
And without the declaring class into consideration, methods named similarly from different interfaces will collide.
S,
ALR -
2. Re: Normal SFSB Business Methods named
alrubinger Dec 13, 2008 11:13 PM (in response to alrubinger)I've been playing with registering the virtual methods of the interfaces instead of the bean impl class. This, coupled with an overriding hash function to take the declaring class of a method into account, moves us forward in terms of getting at whether we have a business or component "remove" method called.
However, it fails the following case:@Stateless @Remote(MyRemoteBusiness.class) public class MyBean{...}
...because MyBean is not assignable to MyRemoteBusiness, MethodInvocation gives us a nice IllegalArgumentException.
I think I'm done messing with this and AOP for now. Patches in progress attached to :
https://jira.jboss.org/jira/browse/EJBTHREE-1621
S,
ALR