[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Intercepting Constructors

2004-04-16 Thread [EMAIL PROTECTED]
Yes, the constructor interceptor runs in the context of the calling code. Uninstrumented code: POJO pojo = new POJO(); Instrumented and intercepted - (pseudo code): POJO pojo = POJO.staticMethodReplacingConstructor(); With a stacktrace similar to this: POJO.PoolingInterceptor.invoke();

[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Intercepting Constructors

2004-04-16 Thread spiritualmechanic
Sweet. Thanks. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3831086#3831086 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3831086 --- This SF.Net email is sponsored by:

[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Intercepting Constructors

2004-04-16 Thread spiritualmechanic
Do I still need to call invocation.invokeNext(), or will I be missing executing some constructor processing if I don't? Like: invokation.invokeNext(); o = Static.method(); return o; Steve View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3831099#3831099 Reply

[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Intercepting Constructors

2004-04-16 Thread Bill Burke
No, you do not have to call invokeNext. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3831101#3831101 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3831101 --- This

[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Intercepting Constructors

2004-04-16 Thread [EMAIL PROTECTED]
In fact, it isn't that you don't have to, you don't want to. invocation.invokeNext() will lead to the real constructor creating an Object instance you don't want. When you do want to invoke the real constructor, use reflection. POJO.class.newInstance(); Regards, Adrian View the original post :

[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Intercepting Constructors

2004-04-16 Thread spiritualmechanic
Bill: One of the aspects tests actually creates a proxy and returns that instead. Is that in the AOP examples, or in jbosstest? Bill: You can also do call side constructor interception of you only want to use the pool in certain code structures. I think Adrian mentioned that as well, in the

[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Intercepting Constructors

2004-04-16 Thread Bill Burke
Let me know if the tutorial is complete enough and answers your questions well enough. Thanks, Bill View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3831137#3831137 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3831137

[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Intercepting Constructors

2004-04-16 Thread spiritualmechanic
All of the examples use invocation.invokeNext(). It might be nice to see an example that doesn't use it (i.e. the proxy you mentioned before). Do one of the unit tests do that? I'm looking through the jbosstest AOP tests and none of them jump out at me for a Proxy. View the original post :

[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Intercepting Constructors

2004-04-16 Thread spiritualmechanic
Do-Does. English. Grammar. Whatever. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3831140#3831140 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3831140 --- This SF.Net