File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Looking for explanation of the following spring term: *com.mytransaction.service.*.*(..)) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Looking for explanation of the following spring term: *com.mytransaction.service.*.*(..))" Watch "Looking for explanation of the following spring term: *com.mytransaction.service.*.*(..))" New topic
Forums: Spring Aspect Oriented Programming
Author

Looking for explanation of the following spring term: *com.mytransaction.service.*.*(..))

Greg Funston
Ranch Hand

Joined: Feb 09, 2011
Posts: 81

Hi,

I saw this term "*com.mytransaction.service.*.*(..))" in the following code snippet. I was looking for an explanation of the "(..)" portion and what it means to the configuration.



Thanks

Tim Cooke
Bartender

Joined: Mar 28, 2008
Posts: 824
    
  38

The "(..)" portion is "regardless of parameters".

So the whole pointcut expression applies to any class in package com.mytransaction.service, regardless of method, and regardless of parameters.

The leading * is irrelevant for Spring AOP. It has a meaning in Aspect J, which is where the notation comes from, but Spring AOP ignores it.


Tim Driven Development
Greg Funston
Ranch Hand

Joined: Feb 09, 2011
Posts: 81

Thanks very much. I expected that was the case. Nice to have it confirmed.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Looking for explanation of the following spring term: *com.mytransaction.service.*.*(..))
 
Similar Threads
Logging aspect
Hello world spring aop
Transaction demarcation works with TransactionProxy but not AOP
Spring Transaction by AOP
AOP declared without indicating when the advice to be fired