Re: [aspectwerkz-user] Deploying on Jonas 4.1.4 (j2ee app utilizing AW-2.0). JDK 1.4.2
Alexandre Vasseur <[email protected]>
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <[email protected]> |
Hi The deployment packaging sound ok. The -D... option you are using should tell you more about that The class circularity error may happen when a pointcut is matching too many things, especially things that needs to be used to run the matching mechanism itself. You may try with -Daspectwerkz.transform.details=true and you may as well narrow down your pointcut to a package if you know that information with a within(com.mypackage..*) (without hierarchical "+" pattern) Alex On Thu, 24 Mar 2005 04:29:51 -0800 (PST), Wirama Putra <[email protected]> wrote: > Hi, > > Have anyone successfuly used AspectWerkz 2.0 (online > mode) in J2EE application deployed on Jonas 4.1.4? > Version of JDK is 1.4.2 > > I've tried modifying %JONAS_ROOT%/bin/nt/setenv.bat. I > replaced the following line: > --- > Set JAVA=%JAVA_HOME%\bin\java > --- > with: > --- > set ASPECTWERKZ_HOME=d:\javalib\aspectwerkz-2.0 > set JAVA=%ASPECTWERKZ_HOME%\bin\aspectwerkz.bat > set JAVA_OPTS=%JAVA_OPTS% > -Daspectwerkz.transform.details=false > --- > > Then when I run "jonas -fg start", I got this error: > --- > AspectWerkz - INFO - Pre-processor > org.codehaus.aspectwerkz.transform.AspectWerkzPreProcessor > loaded and initialized > 2005-03-24 18:35:29,491 : PolicyProvider.init : Using > JOnAS PolicyConfigurationFactory provider and JOnAS > Policy provider > AspectWerkz - WARN - Error pre-processing class > javax.security.jacc.PolicyContext in > Thread[main,5,main] > java.lang.ClassCircularityError: > javax/security/jacc/PolicyContext > --- > > What have I done wrong? > > Now about packaging (of EAR) & deployment strategy. I > have 3 important jars in my EAR (myapp.ear): > - myframework.jar > - myejb.jar > - mydomain.jar > > I put them all directly under root of myapp.ear. > > myejb.jar only contains 1 stateless bean, facade to > services available in myapp.jar (which are plain java > objects). > I have something like this in myejb.jar's MANIFEST.MF: > > Class-Path: myframework.jar mydomain.jar > > I want to apply an advice (SideEffectAspect) around > all public methods of interfaces (in mydomain.jar) > that extends myframework.Service or > myframework.Repository. > So I have something like this declared in my aop.xml > --- > <pointcut name="publicServicesAndRepositories" > expression="execution(public * > myframework.Service+.*(..)) OR execution(public * > myframework.Repository+.*(..))"/> > --- > I put that aop.xml under META-INF of myframework.jar > > I also copy the following files to > %JONAS_BASE%/lib/ext: > - aspectwerkz-2.0.jar > - aspectwerkz-core-2.0.jar > - aspectwerkz-jdk14-2.0.jar > - concurrent-1.3.1.jar > - jrexx-1.1.1.jar > - qdox-1.4.jar > - trove-1.0.2.jar > > My question is: will that work? :) Sorry if the > question sounds stupid (I should've tried it before > asking such question). Maybe some of us here have > successfully ran J2EE app (utilizing AW2.0) on Jonas > 4.1.4 with JDK 1.4.2. Please let us know how you did > it. > > Best regards and TIA, > Raka ( http://www.jroller.com/page/donraka ) > > > __________________________________ > Do you Yahoo!? > Make Yahoo! your home page > http://www.yahoo.com/r/hs >