Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] AJDT Issue?????

All,

I am not sure if this is a bug on my part of on AJDT.  I am using Eclipse
with the AJDT plug-in and I have the following aspect:

public aspect TransactionAspect
{
	private UserTransactionHelper TransactionCommand.trans = new
UserTransactionHelper();
	
	pointcut transaction(TransactionCommand tc) :
		target(tc) && execution(public * *(..));
		
	before(TransactionCommand tc) : transaction(tc)
	{
		tc.trans.startTransaction();
	}
	
	after(TransactionCommand tc) : transaction(tc)
	{
		tc.trans.commitTransaction();
	}
}

When I look at the Outline view to see what is affected all methods within
my project receive this advice.  But if I can it to what I really meant
which was to add before and after advice to all the implementers of the
TransactionCommand interface:

public aspect TransactionAspect
{
	private UserTransactionHelper TransactionCommand.trans = new
UserTransactionHelper();
	
	pointcut transaction(TransactionCommand tc) :
		target(tc) && execution(public * TransactionCommand.*(..));
		
	before(TransactionCommand tc) : transaction(tc)
	{
		tc.trans.startTransaction();
	}
	
	after(TransactionCommand tc) : transaction(tc)
	{
		tc.trans.commitTransaction();
	}
}

Then the Outline view properly shows this advice affect all implementers of
TransactionCommand.  So my question is this a bug or was my original
definition wrong?  Or some combination or both?

Thanks,

Ron
 
**************************************************************************
The information transmitted herewith is sensitive information intended only
for use by the individual or entity to which it is addressed. If the reader
of this message is not the intended recipient, you are hereby notified that
any review, retransmission, dissemination, distribution, copying or other
use of, or taking of any action in reliance upon this information is
strictly prohibited. If you have received this communication in error,
please contact the sender and delete the material from your computer.


Back to the top