Last modified by David Avendasora on 2010/11/30 06:43

From version 16.1
edited by David Avendasora
on 2010/11/30 06:43
Change comment: There is no comment for this version
To version 15.1
edited by David Avendasora
on 2010/11/30 06:42
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,11 +1,7 @@
1 -This article was written by Andrew Lindesay ([[http:~~/~~/www.lindesay.co.nz>>url:http://www.lindesay.co.nz||shape="rect"]]) around February 2005. It first appeared as LaTeX PDF and has been transcribed into this Wiki. You use the information contained in this document at your own risk. Please contact the author if you feel there may have been an error in the conversion to Wiki markup.
1 +This article was written by Andrew Lindesay ([[http://www.lindesay.co.nz]]) around February 2005. It first appeared as LaTeX PDF and has been transcribed into this Wiki. You use the information contained in this document at your own risk. Please contact the author if you feel there may have been an error in the conversion to Wiki markup.
2 2  
3 -|=(((
4 -Contents
5 -)))
6 -|(((
7 -{{toc style="disc"/}}
8 -)))
3 +|= Contents
4 +| {{toc style="disc"}}{{/toc}}
9 9  
10 10  = Applicability =
11 11  
... ... @@ -23,7 +23,7 @@
23 23  
24 24  = Before you Start =
25 25  
26 -A WebObjects system which is deployed in the traditional manner consists of a number of copies of the program running separately, each carrying some of the inbound load from users. Each of these 'copies' is termed an instance. The {{code language="none"}}SiteConfig.xml{{/code}} file defines the instances. This configuration file is located at the following place in your MacOS-X Server's file system.
22 +A WebObjects system which is deployed in the traditional manner consists of a number of copies of the program running separately, each carrying some of the inbound load from users. Each of these 'copies' is termed an instance. The ##SiteConfig.xml## file defines the instances. This configuration file is located at the following place in your MacOS-X Server's file system.
27 27  
28 28  {{noformat}}
29 29  
... ... @@ -31,13 +31,13 @@
31 31  
32 32  {{/noformat}}
33 33  
34 -Before you modify it, make a backup of the {{code language="none"}}SiteConfig.xml{{/code}} file in case anything goes wrong.
30 +Before you modify it, make a backup of the ##SiteConfig.xml## file in case anything goes wrong.
35 35  
36 36  = Setup =
37 37  
38 -The instances are modified such that they are able to be connected to remotely using the {{code language="none"}}jdb{{/code}} debugging tool. Some "additional arguments" need to be inserted into the configuration in the {{code language="none"}}SiteConfig.xml{{/code}} file for each instance in order to achieve this. These additional arguments are inserted as shown below in the text of the element {{code language="none"}}additionalArgs{{/code}}. You will need to choose a different address for each instance - choose addresses from 8000 - 8999. This is a TCP/IP port. Note that the additional arguments should all appear on one continuous line. The author has split this up here to improve readability.
34 +The instances are modified such that they are able to be connected to remotely using the ##jdb## debugging tool. Some "additional arguments" need to be inserted into the configuration in the ##SiteConfig.xml## file for each instance in order to achieve this. These additional arguments are inserted as shown below in the text of the element ##additionalArgs##. You will need to choose a different address for each instance - choose addresses from 8000 - 8999. This is a TCP/IP port. Note that the additional arguments should all appear on one continuous line. The author has split this up here to improve readability.
39 39  
40 -{{code 0="xml"}}
36 +{{code value="xml"}}
41 41  
42 42  ...
43 43  <instanceArray type="NSArray">
... ... @@ -54,9 +54,9 @@
54 54  
55 55  {{/code}}
56 56  
57 -The {{code language="none"}}element{{/code}} tag will repeat here for all the instances inside the {{code language="none"}}instanceArray{{/code}} tag.
53 +The ##element## tag will repeat here for all the instances inside the ##instanceArray## tag.
58 58  
59 -The {{code language="none"}}id{{/code}} tag gives the instance number and you need to remember the mapping from the instance number to the {{code language="none"}}address{{/code}} in the additional arguments. Jot this information down on a piece of paper. For example, one can see above that the instance 1 is mapped to address 8121.
55 +The ##id## tag gives the instance number and you need to remember the mapping from the instance number to the ##address## in the additional arguments. Jot this information down on a piece of paper. For example, one can see above that the instance 1 is mapped to address 8121.
60 60  
61 61  Now restart your instances.
62 62  
... ... @@ -72,11 +72,11 @@
72 72  
73 73  The instances are listed in the JavaMonitor. A screenshot is shown below with the instance number circled in red. You need to first identify which instance has frozen.
74 74  
75 -[[image:attach:Monitor-with-instances.gif]]
71 +[[image:Monitor-with-instances.gif]]
76 76  
77 77  Once you have the instance number, using your instance to address mapping from the setup, identify the address you want to connect to.
78 78  
79 -Use the {{code language="none"}}jdb{{/code}} command line tool that comes with the java environment to connect to the instance and debug it. To do this, enter a command of the following form on the application server.
75 +Use the ##jdb## command line tool that comes with the java environment to connect to the instance and debug it. To do this, enter a command of the following form on the application server.
80 80  
81 81  {{noformat}}
82 82  
... ... @@ -92,13 +92,13 @@
92 92  
93 93  {{/noformat}}
94 94  
95 -This may be useful in situations where your WebObjects application server does not have the {{code language="none"}}jdb{{/code}} tool installed and so you need to run the jdb tool from a host where the {{code language="none"}}jdb{{/code}} tool is installed.
91 +This may be useful in situations where your WebObjects application server does not have the ##jdb## tool installed and so you need to run the jdb tool from a host where the ##jdb## tool is installed.
96 96  
97 -You will now be using the java debugger. There are a slew of commands that can help you work with the debugged java system, but this article is just going to focus on getting the thread stack traces. Issue the command {{code language="none"}}suspend{{/code}} to freeze all of the threads so they can be dumped and then the command {{code language="none"}}where all{{/code}} in order to get all the stack traces of the threads. Finally when you wish to resume the threads again, issue the command {{code language="none"}}resume{{/code}}. You're advised to actually quit the {{code language="none"}}jdb{{/code}} environment as soon as you have the information you need.
93 +You will now be using the java debugger. There are a slew of commands that can help you work with the debugged java system, but this article is just going to focus on getting the thread stack traces. Issue the command ##suspend## to freeze all of the threads so they can be dumped and then the command ##where all## in order to get all the stack traces of the threads. Finally when you wish to resume the threads again, issue the command ##resume##. You're advised to actually quit the ##jdb## environment as soon as you have the information you need.
98 98  
99 99  = What to Look For =
100 100  
101 -{{code language="none"}}jdb{{/code}}'s {{code language="none"}}watch all{{/code}} command will give you a stack trace for all threads in your app. But your process needs first to be suspended in order to get a coherent stack trace. Use it like so:
97 +##jdb##'s ##watch all## command will give you a stack trace for all threads in your app. But your process needs first to be suspended in order to get a coherent stack trace. Use it like so:
102 102  
103 103  {{noformat}}
104 104  
... ... @@ -149,4 +149,4 @@
149 149  
150 150  = Alternative Approaches =
151 151  
152 -[[http:~~/~~/www.gvcsitemaker.com/gvc.webobjects/faq&mode=single&recordID=41413>>url:http://www.gvcsitemaker.com/gvc.webobjects/faq&mode=single&recordID=41413||shape="rect"]]
148 +[[http://www.gvcsitemaker.com/gvc.webobjects/faq&mode=single&recordID=41413]]