Re: [aspectwerkz-user] aspectwerkz , ant and junit
Alexandru Popescu <[email protected]> Wed, 23 Nov 2005 09:13:32 +0200
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <[email protected]> |
#: Colin Taylor changed the world a bit at a time by saying on 11/23/2005 7:10 AM :# > Hi there, having a bit of bit somewhere between ant, junit, and aspectwerkz. > > I making a dynamic proxy with makeProxyAdvisable set to true but for some > reason this fails in my units tests .. ie. I get a ClassCastException > > So : > > 1. Object proxy = Proxy.newInstance(classToProxy, false, true); // > not an instanceof Advisable > > 2. ((Advisable) proxy).aw_addAdvice(ASYNCHABLE_METHOD,new > SchedulingAdvice(this, schedule, serviceClass)); // ClassCastException. > > Presumably > > Does anyone have any suggestions? I guess I could mock out Aspectwerkz with > JMock but seems like a tricky hassle. Is that how these things are normally > done ? > > > cheers for any help > Colin. > I cannot recall the semantics of Advisable, but I know that Jonas had 2 blog entries about how o use it. Please check the documentation and those entries for details. hth, ./alex -- .w( the_mindstorm )p.