Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-dev] Binding parameters in concrete aspects?




Ron,

So the answer is probably. I suggest you comment on the M4 ehancement:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=95529.

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM 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/

"Ron Bodkin" <rbodkin@xxxxxxxxxxxxxx>@eclipse.org on 07/09/2005 07:54:09

Please respond to AspectJ developer discussions <aspectj-dev@xxxxxxxxxxx>

Sent by:    aspectj-dev-bounces@xxxxxxxxxxx


To:    "'AspectJ developer discussions'" <aspectj-dev@xxxxxxxxxxx>
cc:
Subject:    RE: [aspectj-dev] Binding parameters in concrete aspects?


I want to extend a pointcut in an abstract aspect with a concrete advice
that binds it. E.g.,

public abstract aspect AbstractOperationMonitor extends
AbstractRequestMonitor {
...
    protected pointcut classControllerExec(Object controller);

    Object around(final Object controller) :
classControllerExec(controller)
{
        RequestContext rc = new OperationRequestContext() {
            public Object doExecute() {
                return proceed(controller);
            }

            protected Object getKey() {
                return controller.getClass();
            }
        };
        return rc.execute();
    }
...
}

Then:
    <concrete-aspect
name="glassbox.inspector.monitor.operation.CustomMvcMonitor "
extends="glassbox.inspector.monitor.operation. OperationMonitor">
        <pointcut name="classControllerTarget(Object controller)"
           expression=" (execution(* com.ibatis.struts.BaseBean..*(..)) &&
cflow(execution(* com.ibatis.struts.BeanAction.execute(..)) &&
this(controller)"/>
     </concrete-aspect>

-----Original Message-----
From: aspectj-dev-bounces@xxxxxxxxxxx
[mailto:aspectj-dev-bounces@xxxxxxxxxxx] On Behalf Of Matthew Webster
Sent: Tuesday, September 06, 2005 11:42 PM
To: AspectJ developer discussions
Subject: Re: [aspectj-dev] Binding parameters in concrete aspects?





Ron,

The current specification does not allow you to write advice. How will you
use the variable?

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM 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/

"Ron Bodkin" <rbodkin@xxxxxxxxxxxxxx>@eclipse.org on 07/09/2005 03:43:56

Please respond to AspectJ developer discussions <aspectj-dev@xxxxxxxxxxx>

Sent by:    aspectj-dev-bounces@xxxxxxxxxxx


To:    "'AspectJ developer discussions'" <aspectj-dev@xxxxxxxxxxx>
cc:
Subject:    [aspectj-dev] Binding parameters in concrete aspects?


Is there (planned to be) any way to write XML-defined aspects in an aop.xml
file that bind variables, e.g.,

<concrete-aspect name="sample " extends="monitor.AbstractTracing">
    <pointcut name="monitorPoint(Object action)" expression="execution(*
action(..)) && this(action)"/>
</concrete-aspect>

It seems like this would be useful extension to the proposed concrete
aspects support. Please correct me if there is a way to do this and I'm
just not aware of it.

Thanks,
Ron
 _______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-dev

_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-dev




Back to the top