[seam-dev] Javassist limitation?

Dan Allen dan.j.allen at gmail.com
Sun May 18 00:55:59 EDT 2008


While researching the internals of Seam, I observed that interceptors
are not applied to methods that a component invokes on itself, even if
those are public. This would be any method that could be written
prefixed with "this." or "super.". This behavior differs from how
interceptors work on true proxies, of which session beans are an
example.

((MyComponent) Component.getInstance(MyComponent.class)).outerMethodCall();
// intercepted

@Name("myComponent")
public class MyComponent {
  public void outerMethodCall() {
    innerMethodCall(); // not intercepted
  }
  public void innerMethodCall() { }
}

Is this something we should try to fix or should we just document it
as expected behavior? Unfortunately, I find it quite limiting because
it takes away from the fine-grained control you would get when working
with things like transactions and security.

-Dan

-- 
Dan Allen
Software consultant | Author of Seam in Action

http://www.mojavelinux.com
http://manning.com/dallen

NOTE: While I make a strong effort to keep up with my email on a daily
basis, life and work come first and, at times, keep me away from my mail
for a while. If you contact me, then don't hear back for more than a week,
it is very likely that I am excessively backlogged or the message was
caught in the spam filters. Please don't hesitate to resend a message if
you feel that it did not reach my attention.



More information about the seam-dev mailing list