[jboss-user] [JBoss AOP] - Re: ConstructorInvocation and ConstructionInvocation?
kabir.khan@jboss.com
do-not-reply at jboss.com
Mon Jul 31 07:35:30 EDT 2006
Yes, the difference is in the weaving
| excecution(org.blah.Blah->new(int))
|
becomes a ConstructorInvocation
| excecution(org.blah.Blah->new(boolean))
|
becomes a ConstructionInvocation
Once we weave
| class Blah{
| Blah(int i){
| //Normal code
| }
|
| Blah(boolean b){
| //Normal code
| }
| }
|
| class Blah{
|
| static Blah_new(int i){
| //Hooks for AOP creating a ConstructorInvocation, eventually calling new Blah(i)
| }
|
| Blah(int i){
| //Normal code
| }
|
| Blah(boolean b){
| //Normal code
|
| //Hooks for AOP with a ConstructionInvocation
| }
| }
|
For ConstructorInvocation to work we need to make sure that everyone who calls new Blah(int), calls Blah.Blah_new(int) instead. So ConstructionInvocation can be more efficient, but is triggered at a slightly different time.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961839#3961839
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961839
More information about the jboss-user
mailing list