ykrishnaprasad wrote :
| a) Can get the type of an invocation(whether its a METHOD)?
|
i guess you mean in the interceptor, so yes. just either try to cast it to a
MethodInvocation or check if its an instanceof MethodInvocation.
ykrishnaprasad wrote :
| b) Can i use
You can write an advice that receives a MethodCalledByMethodInvocation. This
way, you can access the caller.
However, this invocation must be used only on advices bound to call pointcut
expressions.
If you use an execution pointcut, what you get is MethodInvocation, and you
will only have
Thanks a bunch guys!
I think i got the basic caller pointcut working for
MethodCalledByMethodInvocation.
Here is a simple set of classes that i used for this purpose:
| package DCR2;
|
| public class HelloAOP {
| public static void main(String args[]){
| new
I haven't yet exactly figured out the solution to my specific problem.But here
is somthing that might be of help - caller
pointcuts(http://wiki.jboss.org/wiki/Wiki.jsp?page=CallerPointcuts) and
MethodCalledByMethod class in org.jboss.aop.joinpoint package.
If i am successful i will post a
Kabir,
a) Can get the type of an invocation(whether its a METHOD)?
To be specific i was looking at
-http://www.onjava.com/pub/a/onjava/2003/05/28/aop_jboss.html?page=1
Things might have changed since the article was written.Wondering how to do the
same with the new APIs.
b) Can i use
Hello Krishna,
I am trying to get something similar working as you had put in your question on
the message forums. I am trying to get the caller and callee of a call
between two EJBs. Do you have suggestions ?
Thanks for your time !
Gunjan
ykrishnaprasad wrote : Kabir,
| In my interceptor
Kabir,
In my interceptor class i can get a reference to the target object.
How can i get a reference to the caller object in the interceptor class?
Thanks
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3989529#3989529
Reply to the post :
You can't if you use execution or field pointcuts, if you want access to
the caller you need a call pointcut, but those have certain limitations.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3989532#3989532
Reply to the post :
There is no easy way to do this at the AOP layer, but it seems that if the call
is local the EJBContainerInvocation will contain something under
| invocation.getMetaData(IS_LOCAL, IS_LOCAL);
|
You could customize the stack of interceptors used for your ejb 3 container(s)
in
EJB 3
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3988433#3988433
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3988433
___
jboss-user mailing list
jboss-user@lists.jboss.org
EJB 2 or 3?
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3988291#3988291
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3988291
___
jboss-user mailing list
11 matches
Mail list logo