I need to create an aspect that is hard for me to describe, so let me point out ideas:
- any method inside the package (or any subpackage) com.xy ..
- one argument of the method is an implementation of the javax.portlet.PortletRequest interface
- there may be more arguments in the method
- they can be in any order
I need a pointcut and "around" tip with the PortletRequest parameter specified
I currently have smt like:
@Pointcut("execution(* com.xy.*.*(PortletRequest,..)) && args(request,..)") public void thePointcut(PortletRequest request) { } @Around("thePointcut(request)") public Object theAdvice(ProceedingJoinPoint joinPoint, PortletRequest request) { ...
and get an error message:
ERROR 10: 47: 27.159 [ContainerBackgroundProcessor [StandardEngine [Catalina]]] osweb.portlet.DispatcherPortlet - Context Initialization error org.springframework.beans.factory.BeanCreationException: Error creating bean named org.springframework.web.servlet. mvc.HttpRequestHandlerAdapter ': Bean initialization failed; The nested exception is java.lang.IllegalArgumentException: w arning no match for this type name: PortletRequest [Xlint: invalidAbsoluteTypeName]
Any help is much appreciated
Regards, Dan
The UPDATE method I'm trying to intercept:
in the public class com.xyMainClass :
public String mainRender(Model model, RenderRequest request) throws SystemException
in the public class com.xyasd.HelpClass :
public final void helpAction(ActionRequest request, ActionResponse response, Model model)
In the course, I want to get an argument that implements PortletRequest, that is, RenderRequest from the first method, and ActionRequest from the second.
Regards, Dan
Queequeg
source share