Re: [aspectwerkz-user] Deploying on Jonas 4.1.4 (j2ee app utilizing AW-2.0). JDK 1.4.2
Wirama Putra <[email protected]>
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <[email protected]> |
Hi...
I just upgraded my JDK to 1.5.0_02, and my Jonas to
4.3.4, rebuilt aspectwerkz 2.0, and add the following
lines in %JONAS_ROOT%/bin/nt/setenv.bat:
Rem ----------
Rem AW setup
Rem ----------
Set EXT=%JONAS_BASE%\lib\ext
Set
CLASSPATH=%EXT%\aspectwerkz-2.0.jar;%EXT%\aspectwerkz-core-2.0.jar;%EXT%\aspectwerkz-jdk5-2.0.jar;%EXT%\concurrent-1.3.1.jar;%EXT%\dom4j-1.4.jar;%EXT%\jrexx-1.1.1.jar;%EXT%\qdox-1.4.jar;%EXT%\trove-1.0.2.jar;%CLASSPATH%
Set JAVA_OPTS=%JAVA_OPTS%
-javaagent:%EXT%\aspectwerkz-jdk5-2.0.jar
The problem (circularity) has gone. No more :) Seems
like it's working now.
Only one problem remaining though... about pointcut
definition.... Here's the content of my aop.xml:
<aspectwerkz>
<system id="revtechframework">
<aspect
class="com.revtech.framework.aop.SideEffectAspect">
<pointcut name="publicServiceAndRepository"
expression="execution(public *
com.revtech.framework.service.Service+.*(..)) OR
execution(public *
com.revtech.framework.repository.Repository+.*(..))"/>
<advice name="invoke" type="around"
bind-to="publicServiceAndRepository"/>
</aspect>
</system>
</aspectwerkz>
What I want is: "publicServiceAndRepository" pointcut
matches all method declared in _interfaces_ that
extend interface Service or Repository.
But what I got is: the pointcut also matches all
public methods defined in _classes_ that implements
interface that extends Service / Repository.
Can we define pointcut programatically? (like Advisor
in Spring)?
That way I can implement method "public boolean
matches(Method m, Class targetClass)" that returns
true if targetClass is an interface.
Best regards,
Raka
--- Alexandru Popescu <[email protected]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Can you post the you aop.xml?
>
> - --
> :alex |.::the_mindstorm::.|
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/