-
1. Re: injboss example doesn't seem to work
drakonis Apr 6, 2005 7:48 PM (in response to javajedi)I may need to suscribe to the same problem, although i'm kinda new to jboss and total beginer with aop, but it kinda lacks any first stepts into jboss aop.
Was following the docs on
http://docs.jboss.org/aop/1.1/aspect-framework/examples/injboss/aopInJbossPackaging.html . There it says
The running with Jboss Application Server is a dead link however. Points to http://docs.jboss.org/aop/1.1/aspect-framework/misc/running_jboss.html which is missing on the site and in the doc. that come with jboss-aop_1.1.1.zip too. So i may belive that the answer to the question lies with that and will be forever lost to us mere mortals:).
All the examples shown here use loadtime transformations, so you will need to modify your jboss/server/--yourconfig--/conf/jboss-service.xml as outlined in Running with JBoss Application Server
I modified the build xml to go for the default starting of the server.
Went for ant deploy-basic-lt-war which at the end says "Classes have not been aop'ed - run JBoss with enable transformations = true" Did a google on that, nothing was found. However in a post i found that someone set
EnableTransformer to true in the /default/conf/jboss-service.xml . I myself have not any EnableTransformer in jboss-service.xml to be set.
But javajedi if u'll be kind to answer where did u read about the pluggable-instrumentor.jar . I have not found any reference to it. Is it necesary?
Well hope someone has any answers. -
2. Re: injboss example doesn't seem to work
bill.burke Apr 6, 2005 7:53 PM (in response to javajedi)Please read our documentation. It comes with both the distribution and is online here:
http://docs.jboss.org/aop/1.1/aspect-framework/reference/en/html/running.html
The JBoss 3.2.x integration is broken with 1.1.1. It will be fixed with 1.1.2. -
3. Re: injboss example doesn't seem to work
javajedi Apr 6, 2005 8:33 PM (in response to javajedi)Already read those docs, and I do have EnableTransformer set to "true". I'm using JBoss 4.0.1.
-
4. Re: injboss example doesn't seem to work
bill.burke Apr 6, 2005 9:08 PM (in response to javajedi)Jedi. I was talking to drakonis. I'll see if I can reproduce your problem with JDK5/JB4/pluggable_instrumentor
-
5. Re: injboss example doesn't seem to work
javajedi Apr 6, 2005 10:41 PM (in response to javajedi)Thanks for the reply Bill. I figured out what my problem was. In ear-deployer.xml, I had the "Isolated" attribute set to true. Setting it back to false made all of the AOP stuff start working. Is there any way to use JBoss AOP with isolated class loaders enabled?
-
6. Re: injboss example doesn't seem to work
bill.burke Apr 6, 2005 10:46 PM (in response to javajedi)Ok, Jedi, I was unable to reproduce your problem on JBoss 4.0.1SP1.
I think I know what your problem is though.
You must run 'ant deploy-ear'. This target will deploy the aopexample.ear file AS WELL AS a 'jboss-aop.xml' file to the deploy directory.
If you run the 'ant deploy-ear-aop' target, it will create an EAR with a aopexample.aop jar file within the ear. -
7. Re: injboss example doesn't seem to work
bill.burke Apr 6, 2005 11:00 PM (in response to javajedi)Does it work with the 'ant deploy-ear-aop' target? This actually embedds an .aop file within the .ear file. I'll try this out myself.
-
8. Re: injboss example doesn't seem to work
javajedi Apr 6, 2005 11:10 PM (in response to javajedi)That target works fine with isolated class loading disabled. With it enabled, the example doesn't work.
-
9. Re: injboss example doesn't seem to work
bill.burke Apr 6, 2005 11:18 PM (in response to javajedi)The 'ant deploy-ear-aop' works fine for me with scoped classloading, JDK5, javaagent, JBOss 4.0.1sp1. Maybe sp1 is the difference.
<jboss-app> <loader-repository> dot.com:loader=unique-archive-name <loader-repository-config> java2ParentDelegaton=false </loader-repository-config> </loader-repository> </jboss-app>
-
10. Re: injboss example doesn't seem to work
javajedi Apr 8, 2005 12:26 AM (in response to javajedi)Hmmm...that's very strange. I downloaded JBoss 4.0.1sp1, installed jboss-aop 1.1.1, and ran ant deploy-ear-aop on in injboss example. JDK 1.5, Linux. Example worked fine. Added the jboss-app.xml from your post to aopexample.ear, example didn't work. Removed the jboss-app.xml, turned on isolated class loaders in ear-deployer.xml, example didn't work. Every time I turn on an isolated class loader, I get:
INFO [STDOUT] **** EarExampleServlet.service()
INFO [STDOUT] *** ExampleSessionBean.getValue()
INFO [STDOUT] **** ExampleValue String Constructor
INFO [STDOUT] **** ExampleValue String Constructor
INFO [STDOUT] **** ExampleValue.getMessage()
What could be different in our environments?