[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Weid problem with javax.naming.InitialContext
|
Title: Weid problem with javax.naming.InitialContext
Hi
This really has me stomped. I am absolutely unable to loadtime weave the InitialContext class. The exact syntax is applied to 2 different classes - one works and the other does not. I do not see anyt weaving output that states that it is weaving anything within the javax.naming package
Hermod
Below is the verification test
aop.xml:
<aspectj>
<weaver
options="-proceedOnError -Xlintfile:META-INF/Xlint.properties -showWeaveInfo -verbose -debug">
<include within="com.ibm.websphere.naming..*" />
<include within="com.ibm.ws.naming.util.WsnInitCtx+" />
<include within="javax.naming..*" />
<include within="com.acme.test..*" />
<aspects>
<aspect name="com.acme.aspect.NamingServiceAspect" />
</aspects>
</aspectj>
package com.acme.aspect;
public aspect NamingServiceAspect {
pointcut initialContextInit() : call(* javax.naming.InitialContext+.init(..));
void around() : initialContextInit()
{
System.out.println("In around initialContextInit");
proceed();
}
pointcut testDoit() : call(* no.dnbnor.it01.aspects.test.Test+.doIt(..));
void around() : testDoit()
{
System.out.println("In around testDoit");
proceed();
}
}
And a test class:
package com.acme.test;
public class Test {
public static void main(String[] args) throws Exception {
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
env
.put(Context.PROVIDER_URL,
"iiop://localhost:2809");
Context initialContext = new InitialContext(env);
Test me=new Test();
me.doIt();
}
public void doIt()
{
System.out.println("In doIt");
}
}
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email.
This email message has been virus checked by the anti virus programs used
in the DnB NOR Group.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *