Hi.

Don't know where to find cause of error:

  |      [java] java.lang.ClassCastException
  |      [java]     at org.nthx.pat.demo.Forum.Forum_new_$aop(Unknown Source)
  |      [java]     at org.nthx.pat.demo.Driver.main(Unknown Source)
  |      [java] Exception in thread "main"
  | 

Decompiled Forum.class:

  | public class Forum
  |     implements Advised, PrevalentSystem, IdentityMap, BusinessObject, 
Identificable, Persistable
  | {
  | ....
  |     public static Forum Forum_new_$aop()
  |     {
  |         if(((Advisor) (aop$classAdvisor$aop)).doesHaveAspects)
  |             return (Forum)aop$classAdvisor$aop.invokeNew((Object[])null, 0);
  |         else
  |             return new Forum();
  |     }
  | 

Client's code for creating Forum:

  | public class RootCreationInterceptor
  | {
  |     public Object invoke(Invocation invocation)
  |     throws Throwable
  |     {
  |         ConstructorInvocation ci = (ConstructorInvocation) invocation;
  |         String patRootClassName = ci.getConstructor().getName();
  |         Class classOfPatRoot = Class.forName(patRootClassName);
  |         PrevalentSystem root = (PrevalentSystem) classOfPatRoot.newInstance();
  |  
  | .....
  | 
  | public class Driver
  | {
  | 
  |     public static void main(String[] args)
  |     {
  |         Forum forum = new Forum();
  |         log.debug("-= Finished creating Forum object =-");
  | 
  | jboss-aop.xml:
  | <bind pointcut="execution(*->@pat.root(..))">
  |     <interceptor class="org.nthx.pat.RootCreationInterceptor" />
  | </bind> 
  | 

JBossAOP version is CVS 10.08.2004 version. Modified not to create _transient_ mixin 
fields. 

Help!

Tomasz

ps. Can attach full source code if needed

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3845600#3845600

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3845600


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to