Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] AspectJ and rmic generated stubs and skeletons.




Subhro,

Do you want the third party to be able to log their interaction with the
server? If yes then you need to supply all the code you list below (this is
no different from a non-AO solution apart from the addition of
aspectjrt.jar). If no then don't weave the client side logic either by
excluding it using the appropriate scoping pointcut or by packaging it in a
separate JAR and not exposing it to the weaver/aspect. If _you_ want to log
client activity but not the third party simply build 2 client-side JARs one
with logging one without (product lines) which is something you cannot do
without using AOP.

Cheers

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/

"Subhrajyoti Moitra" <smoitra@xxxxxxxxxxx>@eclipse.org on 07/06/2005
06:45:57

Please respond to aspectj-users@xxxxxxxxxxx

Sent by:    aspectj-users-bounces@xxxxxxxxxxx


To:    <aspectj-users@xxxxxxxxxxx>
cc:
Subject:    [aspectj-users] AspectJ and rmic generated stubs and skeletons.


Hi,
      I have a code base of some 1000+ classes (web-application).

      I have written an aspect LogginAspect that uses log4j to log into a
      file.
      Using ant+ajc I have compiled the entire codebase is logging is
      happening where ever it needs to happen.

      Now in the same ant build.xml I generate stubs and skeletons of one
      of the rmi Impl classes.
      I make a jar file of this stub and the impl class (earlier compiled
      with ajc) and distribute it to a third party so that it can connect
      to my RMI server.
      First I received a no exceptionjava.lang.NoClassDefFoundError:
      org/aspectj/lang/Signature.
      So I supply the aspectjrt.jar to be put into the classpath of the
      third party.

      Even after this I receive the error “java.lang.NoClassDefFoundError:
      com/xxxxx/xx/xxxxx/aspect/logging/LoggingAspect”

      So I supply this file as well to the third party. So now my
      distribution jar now contains
      Impl classes+ generated
      stubs+aspectjrt.jar+LoggingAspect.class+log4j1.2.8.jar


      Is there is better way to do this please?

      I don’t want the third party to have any dependency on my aspectj
      classes. Please! Please! Please! Help me.

      Thanks a lot in advance,
      Subhro._______________________________________________
      aspectj-users mailing list
      aspectj-users@xxxxxxxxxxx
      https://dev.eclipse.org/mailman/listinfo/aspectj-users

Back to the top