Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-dev] Pointcut question

Hi,
	Good to join this discussion as I first time saw an advised class de-compiled and saw the insertions of the aspect related code in the modified class.

One related question:
	It was just because you looked at the modified de-compiled code (possibly to make sure that all the join points were being covered as you expected) that you got this doubt, right? I think at run time with the way the calls were being made in your code[createQueueConnection() calling createQueueConnection(null, null)], both of your overloads would have been advised even with 'call', no? It is not that createQueueConnection(..) would have advised method createQueueConnection() and not createQueueConnection(String user, String password). Am I wrong?

Rgds,
Roshan


-----Original Message-----
From: Andreas Mueller [mailto:am@xxxxxx] 
Sent: Friday, March 18, 2005 3:43 PM
To: aspectj-dev@xxxxxxxxxxx
Subject: Re: [aspectj-dev] Pointcut question


Hi,

yes, execution does the trick!

Thanks!

Andreas
-- 

Andreas Mueller
IIT GmbH, Bremen/Germany
http://www.swiftmq.com

Rifflard Mickaël wrote:

> Hi Andreas,
> 
> Is the use of execution advice instead of call advice don't solve your problem ?
> 
> Exemple : 
> 
> 	pointcut createConnection() : execution(public * javax.jms.*ConnectionFactory.create*Connection(..));
> 
> Mickaël
> 
> 
> -----Message d'origine-----
> De : aspectj-dev-admin@xxxxxxxxxxx
> [mailto:aspectj-dev-admin@xxxxxxxxxxx]De la part de Andreas Mueller
> Envoyé : vendredi 18 mars 2005 10:36
> À : aspectj-dev@xxxxxxxxxxx
> Objet : Re: [aspectj-dev] Pointcut question
> 
> 
> Hi,
> 
> thanks for the answer.
> 
> Well, I tried to provide a simple example from my more complex code. 
> However, this simple thing seems to work.
> 
> Here is what I want to do actually:
> 
> pointcut createConnection() : call(public * 
> javax.jms.*ConnectionFactory.create*Connection(..));
> 
> If I look into the generated classes, the advice was inserted into
> 
> QueueConnectionFactory.createQueueConnection()
> 
> but not into
> 
> QueueConnectionFactory.createQueueConnection(String user, String password)
> 
> The implementation code of the javax.jms.*ConnectionFactory internally 
> calls createQueueConnection(null,null) when createQueueConnection() is 
> called.
> 
> Andreas
> 


_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-dev


Back to the top