1. Start JProfiler and you will see a Quickstart wizard.
If you do not see this wizard go to Help | Show Quickstart Dialog (or click Shift - F1)
2. Select the radio button labeled "An application server, locally or remotely" and click Next
3. Select 'Generic Application Server' from the dropdown and click Next
4. Check "on this computer" if you profiling on your local box and click Next
5. On next page, select:
JVM Vendor: Sun
Version: 1.4.2
Mode: hotspot
6. Click Next twice to get to the "wait for JProfiler GUI" screen
7. Check "Don't wait, start immediately" and click Next twice
8. On this page, it say "The created session has been named XXXXXX". Take a note of the session name as you will need to look it up to start it and get the session id. Go to the next step.
9. Also on the same page you will see the two sets of arguments that need to be added after the java command line. Copy or take a note of those also.
10. Check "No, I will start the session later" and click Finish
Modify postEnvironment.bat(C:\ATG\ATG7.0\home\localconfig\postEnvironment.bat)
1. Copy and NOT delete, the config.xml from the D:\Documents and Settings\yourid\.jprofiler5\config.xml to a new path where ATG can read (it cannot read directories which have spaces) it and do the same with the agent.jar. For example if you see below i added it to a new folder under D:\. So now ATG will read the config files from this new location and JProfiler from the original location(which is D:\Documents and Settings\yourid\.jprofiler5\config.xml).
2. Add the following lines at the end of all lines in the postEnvironment.bat. These are similar to the ones which you have saved in the above steps except the location of the config.xml and agent.jar have to be modified since ATG cannot read if the path contains a space such as "Documents and Setttings"
set JAVA_ARGS=%JAVA_ARGS% -Xrunjprofiler:port=8849,nowait,id=107,config=D:\jprofilerconfig\config.xml
set JAVA_ARGS=%JAVA_ARGS% -Xbootclasspath/a:D:\jprofilerconfig\agent.jar
To find the session id:
Go to JProfiler and select Session | Start Session.
Find the new session that you created in above (look for the name that you noted when it created the session).
Click on the new session under the Open Session tab and then click the Edit icon.
The session id will be appear after the session name.
The config.xml file is located in your documents and settings directory in the .jprofiler directory (so, something like: D:\Documents and Settings\yourid\.jprofiler5\config.xml where you should change HuangX to your user name).
If you needed to specify a different port for JProfiler to listen to during the configuration of the session above, you should change the port number here too.
3. Remove lines the following lines if they exist in postEnvironment.bat:
4. Save the changes to the postEnvironment.bat and rebuild the app.
Start ATG Dynamo with your normal startDyanmo.bat file
No comments:
Post a Comment