Created On:  2009-11-18

Problem:

There is no direct integration between NetBeans and DevPartner for Java and therefore no testing and official support.  However, manual integration may be possible using the procedure below.

 

Resolution:

Manual integration with NetBeans 6
If  the Java IDE Add-in Manager cannot be used to integrate DevPartner Java Edition,  you may be able to invoke DevPartner Java Edition from within NetBeans by adding the -Xrun or -agentlib argument in an appropriate configuration location as described below.
SE Application
1. You will need to modify the Project Properties for the SE Application project.
2. Right click the Project Name icon and select Properties. Select Run.
In the Project Properties dialog box do one of the following:

If you are using JVMPI (JDK 5.0 or below), add the -Xrun argument to the VM parameters text box, as described in Using -Xrun to Invoke the Profiler in the online help.  A sample string is listed below.
-XrundpjCore:NM_ANALYSIS_TYPE=performance:NM_CONFIG_NAME=test
Note: This is one string without a newline character inserted.

If you are using JVMTI (JDK 5.0 or above), add the -agentlib argument to the VM parameters, as described in Using -agentlib to Invoke the Profiler in the online help. A sample string is listed below.
-agentlib:dpjJvmtiCore=NM_ANALYSIS_TYPE=performance,NM_CONFIG_NAME=test
Note: This is one string without a newline character inserted. Also note the comma delimiter prior to NM_CONFIG_NAME.
Tomcat Server
1. You will need to modify the server configuration profile used when launching the Application server that the application is deployed or create a configuration profile especially designed for this purpose.
2. Select Tools, then Servers from the Menu, then the Apache Tomcat configuration, and select the Platform tab.
In the dialog box do one of the following:

If you are using JVMPI (JDK 5.0 or below), add the -Xrun argument to the VM parameters text box, as described in Using -Xrun to Invoke the Profiler in the online help.  A sample string is listed below.
-XrundpjCore:NM_ANALYSIS_TYPE=performance:NM_CONFIG_NAME=test
Note: This is one string without a newline character inserted.

If you are using JVMTI (JDK 5.0 or above), add the -agentlib argument to the VM parameters, as described in Using -agentlib to Invoke the Profiler in the online help. A sample string is listed below.
-agentlib:dpjJvmtiCore=NM_ANALYSIS_TYPE=performance,NM_CONFIG_NAME=test
Note: This is one string without a newline character inserted. Also note the comma delimiter prior to NM_CONFIG_NAME.

Sun 9 (Glassfish) Server
1. You will need to modify the domain.xml used when launching that instance of the  Application server. Monitor the server used from the Output tab for that application server to determine the domain in use  and select that domain.xml file .
Example: D:\glassfish-v2ur2\domains\domain1\config\domain.xml
2. Open the domain.xml file using a text editor.
3. Do one of the following:

If you are using JVMPI (JDK 5.0 or below), add the -Xrun argument  into a new <jvm-options> tag, before any other <jvm-options> tags in that file, .using syntax as described in Using -Xrun to Invoke the Profiler in the online help.  A sample string is listed below.
-XrundpjCore:NM_ANALYSIS_TYPE=performance:NM_CONFIG_NAME=test
Note: This is one string without a newline character inserted.

If you are using JVMTI (JDK 5.0 or above), add the -agentlib argument to a new <jvm-options> tag, before any other <jvm-options> tags in that file, using syntax as described in Using -agentlib to Invoke the Profiler in the online help. A sample string is listed below.
-agentlib:dpjJvmtiCore=NM_ANALYSIS_TYPE=performance,NM_CONFIG_NAME=test
Note: This is one string without a newline character inserted. Also note the comma delimiter prior to NM_CONFIG_NAME.
4. The new tag may appear similar to the following string in the edited domain.xml file:
<!-- various required jvm-options -->
 <jvm-options>-XrundpjCore:NM_ANALYSIS_TYPE=performance:NM_CONFIG_NAME=test</jvm-options>
 Notes:
If your test server is already running, you must stop and restart that test server after the configuration changes are saved, in order for DevPartner Java Edition to properly hook into the test server and profile your application.