[aosd-discuss] Does anyone have a suggestion?

David.Suarez at us.hsbc.Com David.Suarez at us.hsbc.Com
Thu Jan 22 17:47:03 EST 2004



 I have changed the directory structure for our main project and I have
 come upon a strange issue.  I would like some advice on next steps for my
 debugging effort.  The old code was using a very basic Logging aspect that
 was working fine.  However, the advice does not seem to be working any
 longer.  So I ran javap on the old and new aspect class files and they are
 identical.  Then I ran javap on a class affected by the advice in the old
 build and again with the new built class (assuming it should be affected
 again since the aspect is identical and the source for the classes are
 idental).  The aspect code only shows up in the old build.  So now I'm
 confused, I have the exact same aspect in a different tree but it's no
 longer working.  The only change was the directory structures so I
 attempted to create a super build with everything in one directory for
 debugging.  Still, no dice...  Any suggestions on what I can do next to
 determine why the aspect is no longer getting picked up correctly?

 This is the aspect:

aspect Logging
{

      pointcut dbCall(String theCall):
            (call(ResultData CommonDAO.executeStoredProcedure(Connection, String, boolean, Parameter)) && args(*,theCall,*,*)) ||
            (call(ResultData CommonDAO.executeQuery(Connection, String, boolean, Parameter)) && args(*,theCall,*,*)) ||
            (call(int[] CommonDAO.executeBatchProcedure(Connection, String,Parameter)) && args(*,theCall,*));


      before(String str): dbCall(str)
      {
          System.out.println("(advice-before)new db call="+str+",joinPoint="+thisJoinPoint);
      }

}

This is the ant build command that is running:
      <iajc sourceroots="${bprop.build.src.all}"
            destdir="${bprop.build.classes.all}"
            classpath="${bprop.build.classpath.ajc};${bprop.build.classpath.all}"
            debug="on"
            deprecation="off"/>

build.src.all = the directory where I now have all the source together (I verified that Logging.aj is there)
build.classes.all= the directory to place the generated classes (This directory is what I am running javap against to determine the above differences)
build.classpath.ajc= where aspectjtools.jar and aspectjrt.jar are
build.classpath.all = Support classpath

I've printed out the above variables to view the contents as well and they are exactly as expected.  Oh yes, and I've cleaned out the new bulid
structure a million times as
well to ensure it was recompiling everything.  I even tried to switch the classpath order "just in case".  Where do I go from here?

Any ideas on what could have gone wrong all of a sudden?

Please advise...djsuarez





************************************************************************
 This E-mail is confidential. It may also be legally privileged. If you
 are not the addressee you may not copy, forward, disclose or use any
 part of it. If you have received this message in error, please delete
 it and all copies from your system and notify the sender immediately
 by return E-mail.

 Internet communications cannot be guaranteed to be timely, secure,
 error or virus-free. The sender does not accept liability for any
 errors or omissions.
************************************************************************



More information about the discuss mailing list