Craig, I assume the following: your useful aspects are abstract WRT one or more pointcuts (a requirement of using the concrete-aspect element); the names of the target applications are known only to the user and provided through the tool; you will generate the aop.xml. If so the pointcuts you list below can be used directly in aop.xml. I don't see why you need a separate file with named pointcuts.
Matthew Webster AOSD Project Java Technology Centre, MP146 IBM United Kingdom Limited Hursley Park, Winchester, SO21 2JN, England Telephone: +44 196 2816139 (external) 246139 (internal) Email: Matthew Webster/UK/IBM @ IBMGB, [EMAIL PROTECTED] http://w3.hursley.ibm.com/~websterm/ "Craig Ching" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 05/02/2007 22:05 Please respond to [email protected] To [email protected] cc Subject [aspectj-users] Specifying pointcuts in aop.xml Hi, Is it possible to specify pointcuts such as the following coded pointcuts in the aop.xml: public pointcut loggedGetOperations (HttpServletRequest request, HttpServletResponse response) : args (request, response) && (execution (void com.sun.bookstore1.servlets.BookStoreServlet.doGet(HttpServletRequest, HttpServletResponse)) || execution (void com.sun.bookstore1.servlets.CatalogServlet.doGet(HttpServletRequest, HttpServletResponse)) || execution (void com.sun.bookstore1.servlets.ShowCartServlet.doGet(HttpServletRequest, HttpServletResponse)) || execution (void com.sun.bookstore1.servlets.ShowCartServlet.doGet(HttpServletRequest, HttpServletResponse)) || execution (void com.sun.bookstore1.servlets.CashierServlet.doGet(HttpServletRequest, HttpServletResponse)) || execution (void com.sun.bookstore1.servlets.ReceiptServlet.doPost(HttpServletRequest, HttpServletResponse))); My use case is the following. I want to provide a library of useful aspects (for instance, HttpServlet logging). I want to give the user a tool that allows them to choose the servlets to which this aspect should be applied. What I don't want to have to do is have the user code the aspects in any way. Once the user has selected the servlets to which the aspect should be applied, I'd like to jar up the aspect code and put their selected pointcuts in the aop.xml within the jar file. I saw the other message about specifying the pointcuts in an external file, but the answer (use a pointcut library) wasn't really satisfying because then I'd have to include a build step for my users (true, I could do the build for them, but it's more complicated that way). Is there a solution for me? Has anyone thought about the need for this if not? Cheers, Craig_______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
_______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
