[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Specifying pointcuts in aop.xml
|
Hi Matthew,
Yeah, what this all came down to was that I ran into an apparent bug with the LTW where specifying the pointcuts in the aop.xml wasn't working for me. So I thought (incorrectly) that what I was doing was invalid (the doc could maybe be a little clearer, if someone could point me to a process to follow, I'd be happy to clear it up). It turned out that by turning inlining off my pointcuts did work, so I've opened bugzilla id 173694.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=173694Thanks for the response!
Cheers,
Craig
On 2/13/07, Matthew Webster <matthew_webster@xxxxxxxxxx> wrote:
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, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/
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
aspectj-users@xxxxxxxxxxx
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
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users