Saturday, July 12, 2008


Oracle Application Diagnostics for Java is a helpful tool. It allows you to take a look at what your java application is doing and which parts of your program are using the most resources. I am just getting started on this tool, but it looks promising.

Here are some basic instructions to get you started...

NOTE: dumping the heap on my machine caused the machine to REBOOT. You might want to consider carefully before trying this on any important machine (like production). I have a question out to the Jdev forum on how to avoid this. I have a feeling this functionality would allow one a whole bunch more diagnostics to look at.

OK, the basic idea is…1. get the zip file from
2. unzip it.
3. there is an install file in there to run called jam.msi. Put that on your machine and doubleclick.
4. Install the jade program wherever you want to; I think you might need to change the http port to something other than 80 though if you already have port 80 defined on your computer (you will be given the opportunity to do this during the installation). This installation will install a “Jam Console” service and a “Jam DB” service and make them turn on by default.
5. Once it is installed, you can start up a browser and go to http://ad4jhost:portyoujustchose/
6. The default username and password is admin/welcome (note that the time out by default for the AD4J product is extremely small. If you are ever presented again with the login screen, just log in and start whatever you were going to do over.)
7. click the setup tab
8. click download agent on the menu bar
9. Click the download icon for the Java Agent EAR file for deployment on remote machine, or use the local machine if you host is localhost. Download that ear file.
10. Deploy this ear to the oc4j where you are running the application you want to diagnose. Now you should be able to run a trace.

To run a trace:
1. log in as above to ad4j console
2. click the java tab
3. click the show JVMs on the menu-bar.
there should be a jvm listed. Under Threads column there should be an Active link. Click the Active link
4. now click the Trace Active Threads menu bar
5. Get ready to run your test in the aplication you want to diagnose.

6. Set Poll Duration field on AD4J Tracing All Active Threads screen to however you want to run the trace for. By default this value is set to 10 seconds. That is not enough time, BTW, to do much of anything.
7. Type in a description so you can identify the trace.
8. Click Start….immediately start your test in your application.
9. The Tracing All Active Threads screen will show you (usually) when it is done running…when the time is up.
Also at that point there is a link to go look at the results of the trace. If you do not see this you can also press the Trace tab, and click a link on the trace you want to look at.

Install guide:
Users guide:

Thursday, July 3, 2008

af:form vs h:form

Here's another difference I notice about the af:form vs h:form. With the h:form it seems components in a form get id's like 'formid:componentid' when you do view source. However, with an af:form your component id is just 'componentid'. I am not 100% sure about this, but I think this is the case.