[JBoss-user] [JBoss AOP] - Re: dynamic interceptor scope

2006-07-10 Thread [EMAIL PROTECTED]
You still need to prepare the joinpoints. The reason the introduced methods get 
intercepted is that when weaving in the introductions we weave in hooks for aop 
simpilar to AOP.

This should have read:
anonymous wrote : 
  | BTW I want to make AOP 2 use JDK 5 and use JBoss Retro to be able to 
support JDK 1.4. This means that the annotation compiler will be retired.
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956536#3956536

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3956536


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss AOP] - Re: dynamic interceptor scope

2006-07-10 Thread [EMAIL PROTECTED]
Ok, just to make sure I understand. Are you saying that I can do dynamic 
interception now without any "prepare" xml or "prepare" annotation?

For example, in PojoCache, I'd know exactly what is the POJO to attach and I 
want to intercept all the fields anyway. So in theory, I can construct the 
AdviceBinding at runtime.

Re: 1.4 compatibility, I am ok with it since this is purely for 2.0 (with 
JDK1.5 only).

Thanks!

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956531#3956531

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3956531


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss AOP] - Re: dynamic interceptor scope

2006-07-10 Thread [EMAIL PROTECTED]
Hi,

With the "old" API interceptors get appended to everything on the object. In 
this case you would need to do some filtering in the aspect. e.g.


  | Object invoke(Invocation inv) throws Throwable
  | {
  |if (inv instanceof FieldInvocation){
  |   //Do work
  |}
  |return inv.invokeNext();
  | }
  | 

With the "new" weaving in AOP 2, you can be more selective about what you 
attach.


  |   AdviceBinding binding2 = new AdviceBinding("get(* 
org.jboss.test.aop.dynamicgenadvisor.POJO->i)", null);
  |   String name2 = binding2.getName();
  |   binding2.addInterceptor(MyInterceptor.class);
  | 
  |   Advised advised = ((Advised)obj);
  |   InstanceAdvisor advisor = advised._getInstanceAdvisor(); 
  |   advisor.getDomain().addBinding(binding2);
  | 

This code exists in head and will be released as an alpha in the 
not-too-distant future. The "old" API is still supported in AOP 2, but will 
probably be deprecated in the future, maybe in AOP 3?

BTW I want to make AOP 2 use JBoss 5 and use JBoss Retro to be able to support 
JDK 1.4. This means that the annotation compiler will be retired.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956523#3956523

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3956523


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user