From: acxsjones <nu...@jb...> - 2005-07-07 15:15:41
|
More information, I had this working with JBoss 4.0.1 back in late Dec. when I was doing research. I am trying to working on adding this to our production branch. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3884043#3884043 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3884043 |
From: <bil...@jb...> - 2005-07-07 15:17:11
|
Please re-read the documentation. You need to put the jdk14-pluggable-transformer.jar and also the generated jboss-classloader-transformer.jar in your bootclasspath. See section 10.3.2 JBoss 4.x and JDK 1.4 BTW, the reason we did this is because the old way was not reliable as it relied on a JBoss specific classloader. Tomcat and other applications use their own customer classloader in many situations which resulted in things like JSPs not getting aspectized. BTW, the old EnableTransformer switch still works. So, if you use EnableTransformer instead of EnableLoadtimeWeaving, you can still use the old way. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3884044#3884044 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3884044 |
From: acxsjones <nu...@jb...> - 2005-07-07 15:27:40
|
I do not know how I missed that. I will give it a try. Thanks View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3884051#3884051 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3884051 |
From: acxsjones <nu...@jb...> - 2005-07-07 20:20:23
|
I try to run create-pluggable-jboss-classloader.bat I get a memory could not be "written" when trying to run the line after rem Run instrumented program I click OK and it goes on a produces jboss-classloader-transformer.jar I have done the rest of the items in the doc and still do not get my aspect to run. Are there any class loading or packaging issues. My ejb is packaged in it's own jar and is in the deploy directory The jboss-aop.xml is in the deploy directory The aspects are packaged in a jar that is in the lib directory Scott View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3884094#3884094 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3884094 |
From: acxsjones <nu...@jb...> - 2005-07-07 20:27:54
|
That bat file line look like %JAVA_CMD% -Xbootclasspath/p:%AOP_FILES% -classpath %USER_CLASSPATH% %AOPPATH% %AOPCLASSPATH% %MAINCLASS_AND_ARGS% I can not find anything def on MAINCLASS_AND_ARGS View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3884095#3884095 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3884095 |
From: <kab...@jb...> - 2005-07-07 21:23:00
|
It works fine for me. Don't worry too much about the contenys of create-pluggable-jboss-classloader.bat. It sounds like it is creating the file as expected Did you do these steps from the docu: anonymous wrote : | This will create a jboss-classloader-transformer.jar. Copy this jar to the bin/ directory of your JBoss Application server distribution. | | Next, you need to copy the jdk14-pluggable-instrumentor.jar from the lib/ directory of your JBoss AOP distribution to the bin/ directory of your JBoss application server installation. Next edit run.sh or run.bat (depending on what OS you're on) and add the following to the JAVA_OPTS environment variable | | | | JAVA_OPTS="$JAVA_OPTS -Dprogram.name=%PROGNAME% -Xbootclasspath/p:jboss-classloader-transformer.jar:jdk14-pluggable-instrumentor.jar" | | | | | | After modifying JAVA_OPTS and setting the EnableLoadtimeWeaving to true, then you should be ready to go. | View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3884105#3884105 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3884105 |
From: acxsjones <nu...@jb...> - 2005-07-07 21:32:29
|
I have add those items to java_opts and added the jars to the bin directory and EnableLoadtimeWeaving=true. And still not executed my aspects. I am working on the examples under injboss and not getting the aspects execute. So there is something miss alined. | | =============================================================================== | . | JBoss Bootstrap Environment | . | JBOSS_HOME: C:\jboss-4.0.2\bin\\.. | . | JAVA: C:\j2sdk1.4.2_06\bin\java | . | JAVA_OPTS: -Dprogram.name=run.bat -Xbootclasspath/p:jboss-classloader-transformer.jar:jdk14-pluggable-instrumentor.jar -Xms128m -Xmx512m | . | CLASSPATH: C:\j2sdk1.4.2_06\lib\tools.jar;C:\jboss-4.0.2\bin\\run.jar | . | =============================================================================== | . | 16:27:24,056 INFO [Server] Starting JBoss (MX MicroKernel)... | 16:27:24,056 INFO [Server] Release ID: JBoss [Zion] 4.0.2 (build: CVSTag=JBoss_ | View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3884108#3884108 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3884108 |
From: <kab...@jb...> - 2005-07-07 21:41:56
|
Make sure that you add org.jboss.injbossaop to the "Include" attribute of the aspect manager service. Otherwise they get excluded by the org.jboss value put into the Exclude attribute. Entries are comma separated. I have enabled this example by default in 1.3.1 View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3884113#3884113 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3884113 |
From: acxsjones <nu...@jb...> - 2005-07-07 21:47:16
|
Done that. My file looks like | <?xml version="1.0" encoding="UTF-8"?> | <!-- $Id: jboss-service.xml,v 1.3.2.3 2005/06/19 07:08:07 bill Exp $ --> | | <!-- ===================================================================== --> | <!-- JBoss Server Configuration --> | <!-- ===================================================================== --> | | <server> | | <mbean code="org.jboss.aop.deployment.AspectManagerService" | name="jboss.aop:service=AspectManager"> | <attribute name="EnableLoadtimeWeaving">true</attribute> | <!-- only relevant when EnableLoadtimeWeaving is true. | When transformer is on, every loaded class gets | transformed. If AOP can't find the class, then it | throws an exception. Sometimes, classes may not have | all the classes they reference. So, the Suppressing | is needed. (i.e. Jboss cache in the default configuration --> | <attribute name="SuppressTransformationErrors">true</attribute> | <attribute name="Prune">true</attribute> | <attribute name="Include">org.jboss.test,org.jboss.injbossaop</attribute> | <attribute name="Exclude">org.jboss.</attribute> | <attribute name="Optimized">true</attribute> | <attribute name="Verbose">false</attribute> | </mbean> | | <mbean code="org.jboss.aop.deployment.AspectDeployer" | name="jboss.aop:service=AspectDeployer"> | </mbean> | | </server> | View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3884115#3884115 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3884115 |
From: <bil...@jb...> - 2005-07-07 22:11:32
|
there is a typo in your "Include" attribute. Do you see it? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3884120#3884120 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3884120 |
From: acxsjones <nu...@jb...> - 2005-07-07 23:09:59
|
no. The only thing I see that I try changing is the . at the end of injbossaop I tried both | <attribute name="Include">org.jboss.test,org.jboss.injbossaop.</attribute> View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3884125#3884125 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3884125 |
From: acxsjones <nu...@jb...> - 2005-07-08 03:13:39
|
OK I got my head out of my The issue was the bat file. I pasted the line directly from the tutorial as | JAVA_OPTS="$JAVA_OPTS -Dprogram.name=%PROGNAME% -Xbootclasspath/p:jboss-classloader-transformer.jar:jdk14-pluggable-instrumentor.jar" | I needed to change the : between the two jars to a ; | JAVA_OPTS="$JAVA_OPTS -Dprogram.name=%PROGNAME% -Xbootclasspath/p:jboss-classloader-transformer.jar;jdk14-pluggable-instrumentor.jar" | I change the other things to make it dos base but not that Thanks again for your help. I have the injboss examples working and I have my old examples working again View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3884138#3884138 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3884138 |