Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Spring AOP caching with AspectJ Weaving is not happening

  1. #11

    Default

    Dear Marten,

    I updated as you said.

    i noticed two extra lines on your debug info:

    Code:
    [java] [AppClassLoader@92e78c] info register aspect org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect
    [java] [AppClassLoader@92e78c] info register aspect org.springframework.transaction.aspectj.AnnotationTransactionAspect
    My debug info:

    Code:
    [java] Apr 24, 2008 5:52:11 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
         [java] INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@21bb53: display name [org.springframework.context.support.ClassPathXmlApplicationContext@21bb53]; startup date [Thu Apr 24 17:52:11 GMT+05:30 2008]; root of context hierarchy
         [java] Apr 24, 2008 5:52:12 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
         [java] INFO: Loading XML bean definitions from class path resource [spring-application.xml]
         [java] Apr 24, 2008 5:52:12 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
         [java] INFO: Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@21bb53]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1df738
         [java] Apr 24, 2008 5:52:13 PM org.springframework.context.weaving.DefaultContextLoadTimeWeaver setBeanClassLoader
         [java] INFO: Found Spring's JVM agent for instrumentation
         [java] [AppClassLoader@223d6d] info AspectJ Weaver Version 1.5.3 built on Wednesday Nov 22, 2006 at 11:18:15 GMT
         [java] [AppClassLoader@223d6d] info register classloader sun.misc.Launcher$AppClassLoader@223d6d
         [java] [AppClassLoader@223d6d] info using configuration file:/D:/cepsPortalWorkspace/SpringAOP/lib/aop.jar!/META-INF/aop.xml
         [java] [AppClassLoader@223d6d] info register aspect com.cit.ecommerce.test.AspectJCachingHandler
         [java] Apr 24, 2008 5:52:13 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
         [java] INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1df738: defining beans [org.springframework.context.weaving.AspectJWeavingEnabler#0,loadTimeWeaver,myBean]; root of factory hierarchy
         [java] *** Called----public getContracts(**) ***
         [java] *** Called----private method (**) ***
         [java] ** Called ---> 1st Time **
         [java] *** Called----public getContracts(**) ***
         [java] *** Called----private method (**) ***
         [java] ** Called ---> 2nd Time **

    i'm not getting those lines. So something i need to include somewhere.
    Will you please observe it and let me know the updates?



    Thanks,
    Ganesh

  2. #12
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    That is just some extra debugging info. Which you will get if you add '-Daj.weaving.verbose=true' that as a jvmarg.

    Next to that have you fixed the error in your aop.xml as I suggested in the previous post?!
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #13

    Default

    That's fine. I'm getting debug info same as yours.

    but thing is not yet solved, Marten. i'm really upset on this.

    Please see the updated aop.xml according to what you said.

    Code:
    <!DOCTYPE aspectj PUBLIC
    "-//AspectJ//DTD//EN" "http://www.eclipse.org/aspectj/dtd/aspectj.dtd">
    <aspectj>
    	<aspects>
    		<!-- weave in just this aspect -->
    		<aspect name="com.cit.ecommerce.test.AspectJCachingHandler" />
    		
    	</aspects>
    	<weaver options="-verbose">
    		<!-- only weave classes in our application-specific packages -->
    		<include within="com.cit.ecommerce.test.*" />
    	</weaver>
    
    </aspectj>
    i'm wondering where could be the problem.
    ....still debugging it. please, could you spot the wrong?

    Ganesh

  4. #14

    Default

    Dear Marten,

    I could be able to figure out the dirty problem.

    Since i'm running it on Weblogic Workshop that is having 'jrocket' as jre, aspectj is not working. So i just deleted that dirty jre from build path.
    Now it's working good. i don't know what could be the reason behind this.

    Now i'll have to put my head on caching.

    Thank you very much for all your efforts and having spent your valuable time for me.

    See you,

    Ganesh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •