The problem is solved - i run it under eclipce, and after switching to the DR2 i need to reassign run-parms for this task. BTW... In DR1 I can't define method-pointcut instead pre-defined interceptor-pointcut. Whis same syntax it's working same. But.... ..after definition <method-pointcut> (see code) my Interceptor don't get control anymore? What is wrong?
jbossaop.xml: | <?xml version="1.0" encoding="UTF-8"?> | <aop xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="jbossaop.xsd"> | <advisable class="test.hello.HelloWorld" fieldFilter="ALL" methodFilter="say.*" /> | <method-pointcut group="localization" class="test.hello.HelloWorld" methodName="say.*"> | <interceptors> | <interceptor class="test.hello.jbossaop.Localization"/> | </interceptors> | </method-pointcut> | <!-- | <interceptor-pointcut class="test.hello.HelloWorld"> | <interceptors> | <interceptor class="test.hello.jbossaop.Localization"/> | </interceptors> | </interceptor-pointcut> | --> | </aop> | | HelloWorld.java | package test.hello; | public class HelloWorld { | public static void main(String[] args) { | HelloWorld helloworldTmp = new HelloWorld(); | helloworldTmp .say("Hello", args[0]); | } | public void say(String message){ | System.out.println(message); | } | public void say(String message, String name){ | say (message + " " + name); | } | } | Localization.java | package test.hello.jbossaop; | | import org.jboss.aop.Interceptor; | import org.jboss.aop.Invocation; | import org.jboss.aop.InvocationResponse; | import org.jboss.aop.InvocationType; | import org.jboss.aop.MethodInvocation; | | public class Localization implements Interceptor { | | public String getName() { | // TODO Auto-generated method stub | return "sdfsdfadsfsd"; | } | | public InvocationResponse invoke(Invocation invocation) throws Throwable { | System.out.println("intercept started!"); | if (invocation.getType() == InvocationType.METHOD){ | MethodInvocation mi = (MethodInvocation )invocation; | if (mi.arguments.length==2){ | mi.arguments[1]="translated:"+mi.arguments[1]; | } | } | // TODO Auto-generated method stub | InvocationResponse ir = invocation.invokeNext(); | return ir; | } | } | <a href="http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3824502#3824502">View the original post</a> <a href="http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3824502>Reply to the post</a> ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
